Thread (1 message) 1 message, 1 author, 2018-02-21

Re: [PATCH v2 4/9] t3701: don't hard code sha1 hash values

From: Junio C Hamano <hidden>
Date: 2018-02-21 16:59:02

Phillip Wood [off-list ref] writes:
Keeping the permission bits makes sense (I'd not thought of them when
I created the patch) as we want to check that the file has the correct
permissions. As for the all-zero object name, is it really worth
leaving it in - if a file has been created or deleted then we'll still
have /dev/null as the file name for one side or the other and the diff
lines will show it as well. As these tests are just to check the state
of the index then I'm not sure the hash values add anything. How do
you feel about a filter like

sed "/^	index/s/ [0-9a-f][0-9a-f]*\.\.[0-9a-f][0-9a-f]*/x/"
Something like that, with perhaps the single 'x' replaced with
something more normal looking and the all-zero thing special cased,
was what I had in mind.

Special casing all-zero matters.  I know that the current code uses
all-zero on the missing side.  The thing is, tests are about
protecting the correctness we currently have, and we want to catch
the next idiot that breaks the code to stop showing all-zero when
talking about the missing side.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help