Re: [PATCH 5/6 v5] merge.c: delegate handling of "-" shorthand to revision.c:get_sha1
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 1, 2017, 22:49 UTC
- Message-ID
- <xmqqpoi0eho8.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1488007487-12965-6-git-send-email-kannan.siddharth12@gmail.com>
Siddharth Kannan <kannan.siddharth12@gmail.com> writes:
Show 9 quoted lines
> The callchain for handling each argument contains the function
> revision.c:get_sha1 where the shorthand for "-" ~ "@{-1}" has already been
> implemented in a previous patch; the complete callchain leading to that
> function is:
>
> 1. merge.c:collect_parents
> 2. commit.c:get_merge_parent : this function calls revision.c:get_sha1
>
> This patch also adds a test for checking that the shorthand works properlyThis breaks "git merge".
Show 6 quoted lines
> +test_expect_success 'merge - should work' ' > + git checkout testing-2 && > + git merge - && > + git rev-parse HEAD HEAD^^ | sort >actual && > + git rev-parse master testing-1 | sort >expect && > + test_cmp expect actual
This test is not sufficient to catch a regression I seem to be seeing.
$ git checkout side $ git checkout pu $ git merge -
used to say "Merge branch 'side' into pu". With this series merged, I seem to be getting "Merge commit '-' into pu".