Re: [PATCH 06/11] t3407: strengthen rebase --abort tests

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

 



On Wed, Sep 08 2021, Phillip Wood via GitGitGadget wrote:

> The existing tests only check that HEAD points to the correct
> commit after aborting, they do not check that the original branch
> is checked out.
> [...]
> +# Check that HEAD is equal to "pre-rebase" and the current branch is
> +# "to-rebase"
> +check_head() {
> +	test_cmp_rev HEAD pre-rebase &&
> +	test "$(git symbolic-ref HEAD)" = refs/heads/to-rebase
> +}

I reflexively thought "use test_cmp here!", but in this case that's
pointless as any difference is noted by test_cmp_rev, we're really
seeing what HEAD is checked out to here. I see we use the same pattern
in various other tests...



[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