From: SZEDER Gábor Date: Mon, 26 Aug 2019 17:10:24 GMT Subject: Re: [PATCH v4 1/1] rebase.c: make sure the active branch isn't moved when autostashing Message-ID: <20190826171024.GR20404@szeder.dev> In-Reply-To: <20190826164513.9102-2-ben@wijen.net> On Mon, Aug 26, 2019 at 06:45:13PM +0200, Ben Wijen wrote: > +test_expect_success 'never change active branch' ' > + git checkout -b not-the-feature-branch unrelated-onto-branch && > + test_when_finished "git reset --hard && git checkout -" && I think it would be safer to explicitly spell out the branch that should be checked out at the end than to rely on 'git checkout -' always being able to figure that out, even in case of a breakage. > + echo changed >file0 && > + git rebase --autostash not-the-feature-branch feature-branch && > + test_cmp_rev not-the-feature-branch unrelated-onto-branch > +' > + > test_done > -- > 2.22.0 >