git/builtin
Ben Wijen d2172ef02d builtin/rebase.c: make sure the active branch isn't moved when autostashing
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: (58794775:/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: (6defce2b:/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
58794775: rebase: implement --[no-]autostash and rebase.autostash

Signed-off-by: Ben Wijen <ben@wijen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-09-07 10:17:05 -07:00
..
2019-07-09 15:25:44 -07:00
2019-07-19 11:30:20 -07:00
2019-07-09 15:25:34 -07:00
2019-07-25 13:59:22 -07:00
2019-01-29 12:47:54 -08:00
2019-04-25 16:41:12 +09:00
2019-05-19 16:45:35 +09:00
2018-10-19 13:34:02 +09:00
2019-08-02 09:55:03 -07:00
2019-07-19 11:30:23 -07:00
2019-05-13 14:22:54 +09:00
2019-01-18 13:49:52 -08:00
2019-07-19 11:30:21 -07:00
2019-07-25 13:59:24 -07:00
2018-05-29 00:28:22 +09:00
2019-06-19 08:19:21 -07:00