Re: [PATCH v5 1/7] add simple tests of consistency across rebase types

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

 



Am 6/4/2013 7:14, schrieb Martin von Zweigbergk:
> On Mon, Jun 3, 2013 at 3:28 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>>> +
>>> +# checks that the revisions in "$2" represent a linear range with the
>>> +# subjects in "$1"
>>> +test_linear_range () {
>>> +     ! { git log --format=%p "$2" | sane_grep " " ;} &&
>>
>> An interesting way to spell:
>>
>>     test $(git rev-list --merges "$2" | wc -l) = 0
> 
> Heh, true. I'll change that.

Then I think it would be even better written as

	revlist_merges=$(git rev-list --merges "$2") &&
	test -z "$revlist_merges"

so as not to ignore errors in the git invocation (and at least one less
fork()).

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