Re: [PATCH 2/4] t7004-tag.sh: re-arrange git tag comment for clarity

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

 



On Sun, Nov 14, 2010 at 18:32, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Ãvar ArnfjÃrà Bjarmason wrote:
>
>> Â Â Â Â Â Â Â Â Â Â Â Â Â I used ! instead of test_must_fail so that
>> the GIT_EDITOR variable was only used in this command invocation,
>
> Â Â Â Â(
> Â Â Â Â Â Â Â ÂGIT_EDITOR=cat &&
> Â Â Â Â Â Â Â Âexport GIT_EDITOR &&
> Â Â Â Â Â Â Â Âtest_must_fail ...
> Â Â Â Â)
>
> ?
>
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â and
>> because the surrounding tests use this style.
>
> Oh, okay. ÂI had the test_must_fail version sitting in my local tree
> as part of the unsent part of the &&-chaining series
> http://thread.gmane.org/gmane.comp.version-control.git/157903/focus=160419
>
> I am happy to see this fixed sooner.

Better to fix it up later IMO in something like your series. One
surgery at a time.

> [...]
>> +test_expect_success \
>> + Â Â 'message in editor has initial comment: first line' '
>> Â Â Â # check the first line --- should be empty
>> - Â Â first=$(sed -e 1q <actual) &&
>> - Â Â test -z "$first" &&
>> + Â Â echo >first.expect &&
>> + Â Â sed -e 1q <actual >first.actual &&
>> + Â Â test_cmp first.expect first.actual
>> +'
>> +
>> +test_expect_success \
>> + Â Â 'message in editor has initial comment: remainder' '
>> Â Â Â # remove commented lines from the remainder -- should be empty
>> - Â Â rest=$(sed -e 1d -e '/^#/d' <actual) &&
>> - Â Â test -z "$rest"
>> + Â Â >rest.expect
>> + Â Â sed -e 1d -e '/^#/d' <actual >rest.actual &&
>> + Â Â test_cmp rest.expect rest.actual
>> Â'
>
> Nice. ÂNote that you've changed the semantics of the test here
> (probably for the better): the $() backquoting operator strips
> trailing newlines, while your sed expression does not.
>
> I assume you've run the tests and made sure they still pass.

Yeah, I've been running all these (also the others in the series) for
months on several different platforms with different options. They all
work.

> For what it's worth,
> Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]