Subject: Re: [PATCH v4 1/1] rebase.c: make sure the active branch isn't moved when autostashing

From: SZEDER Gábor <[email-masked]>
Date: Mon, 26 Aug 2019 19:10:24 +0200

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
>