From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Ramkumar Ramachandra <artagnon@gmail.com>
Subject: Re: [PATCH v2 02/11] tests: at-combinations: check ref names directly
Date: Wed, 8 May 2013 01:03:42 -0500 [thread overview]
Message-ID: <CAMP44s1fjB_d9enPYdGX1Ycez2PYjG0iss9-PUsb+A+E5hMvEw@mail.gmail.com> (raw)
In-Reply-To: <7vfvxyggmb.fsf@alter.siamese.dyndns.org>
On Wed, May 8, 2013 at 12:55 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> Some committishes might point to the same commit, but through a
>> different ref, that's why it's better to check directly for the ref,
>> rather than the commit message.
>>
>> We can do that by calling rev-parse --symbolic-full-name, and to
>> differentiate the old from the new behavior we add an extra argument to
>> the check() helper.
>>
>> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>
> It is signed-off by Ram first but who is the author? You, or him?
I am, but he sent the patch first.
>> t/t1508-at-combinations.sh | 27 ++++++++++++++++-----------
>> 1 file changed, 16 insertions(+), 11 deletions(-)
>>
>> diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh
>> index 46e3f16..bd2d2fe 100755
>> --- a/t/t1508-at-combinations.sh
>> +++ b/t/t1508-at-combinations.sh
>> @@ -4,9 +4,14 @@ test_description='test various @{X} syntax combinations together'
>> . ./test-lib.sh
>>
>> check() {
>> -test_expect_${3:-success} "$1 = $2" "
>> - echo '$2' >expect &&
>> - git log -1 --format=%s '$1' >actual &&
>> +test_expect_${4:-success} "$1 = $3" "
>> + if [ '$2' == 'commit' ]; then
>> + echo '$3' >expect &&
>> + git log -1 --format=%s '$1' >actual
>> + else
>> + echo '$3' >expect &&
>> + git rev-parse --symbolic-full-name '$1' >actual
>> + fi &&
>
> Move the echo outside of if, and match the overall style.
Right.
--
Felipe Contreras
next prev parent reply other threads:[~2013-05-08 6:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 21:55 [PATCH v2 00/11] sha1_name: improvements Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 01/11] tests: at-combinations: simplify setup Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 02/11] tests: at-combinations: check ref names directly Felipe Contreras
2013-05-08 5:55 ` Junio C Hamano
2013-05-08 6:03 ` Felipe Contreras [this message]
2013-05-07 21:55 ` [PATCH v2 03/11] tests: at-combinations: improve nonsense() Felipe Contreras
2013-05-08 5:55 ` Junio C Hamano
2013-05-08 6:49 ` Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 04/11] tests: at-combinations: increase coverage Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 05/11] tests: at-combinations: @{N} versus HEAD@{N} Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 06/11] sha1_name: remove no-op Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 07/11] sha1_name: remove unnecessary braces Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 08/11] sha1_name: avoid Yoda conditions Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 09/11] sha1_name: don't waste cycles in the @-parsing loop Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 10/11] sha1_name: reorganize get_sha1_basic() Felipe Contreras
2013-05-08 7:39 ` Ramkumar Ramachandra
2013-05-08 7:42 ` Felipe Contreras
2013-05-08 18:18 ` Junio C Hamano
2013-05-08 18:41 ` Junio C Hamano
2013-05-08 20:39 ` Felipe Contreras
2013-05-08 21:51 ` Junio C Hamano
2013-05-08 22:06 ` Felipe Contreras
2013-05-07 21:55 ` [PATCH v2 11/11] sha1_name: check @{-N} errors sooner Felipe Contreras
2013-05-07 22:11 ` [PATCH v2 00/11] sha1_name: improvements Felipe Contreras
2013-05-08 5:56 ` Junio C Hamano
2013-05-08 10:44 ` Ramkumar Ramachandra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMP44s1fjB_d9enPYdGX1Ycez2PYjG0iss9-PUsb+A+E5hMvEw@mail.gmail.com \
--to=felipe.contreras@gmail.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).