Re: [PATCH] t4069: test diff behavior with i-t-a paths

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

 



On Mon Aug 10, 2020 at 12:23 PM EDT, Eric Sunshine wrote:
> The hard-coded SHA-1 value in the "index" line is going to cause the
> test to fail when the test suite is configured to run with SHA-256.
> You could fix it by preparing two hash values -- one for SHA-1 and one
> for SHA-256 -- and then looking up the value with test_oid() for use
> with grep. On the other hand, if you're not interested in the exact
> value, but care only that _some_ hash value is present, then you could
> just grep for a hex-string.

Loosely, all this test cares about is that it's not "index 0000000"; or
perhaps, taking another tack, that it doesn't have a "new file" line.

More rigidly, it's nice to confirm that it's a diff from the empty blob
and not from some other random blob.




[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