Re: [PATCH v7 1/6] object-name tests: add tests for ambiguous object blind spots

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> +test_cmp_failed_rev_parse () {
> +	cat >expect &&
> +	test_must_fail git -C "$1" rev-parse "$2" 2>actual.raw &&
> +	sed "s/\($2\)[0-9a-f]*/\1.../" <actual.raw >actual &&
> +	test_cmp expect actual
> +}

That's dense, especially without a comment (or named variable) that
hints readers what the arguments to this helper (and its standard
input) ought to be.

As long as messages from rev-parse on the error stream never has
more than one abbreviated object name on a single line, the above
should give us a copy of the message with expected object name
abbreviated to $2; otherwise we might be missing a /g in the sed
script.




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

  Powered by Linux