Re: [PATCH 09/11] rebase --apply: fix reflog
"Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 8 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> 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.
Show 22 quoted lines
> +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
> +'