Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builtin/rebase.c: make sure the active branch isn't moved when autost…
…ashing Consider the following scenario: git checkout not-the-master work work work git rebase --autostash upstream master Here 'rebase --autostash <upstream> <branch>' incorrectly moves the active branch (not-the-master) to master (before the rebase). The expected behavior: (5879477:/git-rebase.sh:526) AUTOSTASH=$(git stash create autostash) git reset --hard git checkout master git rebase upstream git stash apply $AUTOSTASH The actual behavior: (6defce2:/builtin/rebase.c:1062) AUTOSTASH=$(git stash create autostash) git reset --hard master git checkout master git rebase upstream git stash apply $AUTOSTASH This commit reinstates the 'legacy script' behavior as introduced with 5879477: rebase: implement --[no-]autostash and rebase.autostash Signed-off-by: Ben Wijen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
- Loading branch information