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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux