Re: [PATCH 09/11] rebase --apply: fix reflog

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

 



"Phillip Wood via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
>
> move_to_original_branch() passes the message intended for the branch
> reflog as `orig_head_msg`. Fix this by adding a `branch_msg` member to
> struct reset_head_opts and add a regression test.
> ...
> The "merge" backend already has tests that check both the branch and
> HEAD reflogs.

OK.  This sounds like a good idea.

> +test_expect_success 'rebase --apply reflog' '
> +	git checkout -b reflog-apply start &&
> +	old_head_reflog="$(git log -g --format=%gs -1 HEAD)" &&
> +
> +	git rebase --apply Y &&
> +
> +	git log -g --format=%gs -4 HEAD >actual &&
> +	cat >expect <<-EOF &&
> +	rebase finished: returning to refs/heads/reflog-apply
> +	rebase: Z
> +	rebase: checkout Y
> +	$old_head_reflog
> +	EOF
> +	test_cmp expect actual &&
> +
> +	git log -g --format=%gs -2 reflog-apply >actual &&
> +	cat >expect <<-EOF &&
> +	rebase finished: refs/heads/reflog-apply onto $(git rev-parse Y)
> +	branch: Created from start
> +	EOF
> +	test_cmp expect actual
> +'

Thanks.



[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