Re: [PATCH v2 12/14] rebase --apply: fix reflog

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

 



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

> +	if (opts->orig_head_msg && !update_orig_head)
> +		BUG("ORIG_HEAD reflog message given without updating ORIG_HEAD");
> +
> +	if (opts->branch_msg && !opts->branch)
> +		BUG("branch reflog message given without a branch");
> +

Looking pretty good.

> diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
> index 77a313f62eb..d17b450e811 100755
> --- a/t/t3406-rebase-message.sh
> +++ b/t/t3406-rebase-message.sh
> @@ -105,6 +105,29 @@ test_expect_success 'GIT_REFLOG_ACTION' '
>  	test_cmp expect actual
>  '
>  
> +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
> +'
> +
>  test_expect_success 'rebase -i onto unrelated history' '
>  	git init unrelated &&
>  	test_commit -C unrelated 1 &&



[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