Re: [PATCH] t4069: test diff behavior with i-t-a paths
- From
Raymond E. Pasco <ray@ameretat.dev>
- Date
- Aug 10, 2020, 23:02 UTC
- Message-ID
- <C4TOW9DJ7JW0.1QXQ173P2ERVN@ziyou.local>
- In-Reply-To
- <CAPig+cSn_wrBuMKzoUZ720Hy-Y9RuPpJtmZ1mr--cnyAP866-Q@mail.gmail.com>
On Mon Aug 10, 2020 at 12:23 PM EDT, Eric Sunshine wrote:
Show 7 quoted lines
> 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.