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

2018-03-05 Thread SZEDER Gábor
On Mon, Mar 5, 2018 at 11:59 AM, Phillip Wood wrote: > I did wonder about putting this function in a library when I first wrote > it but decided to wait and see if it is useful instead. As Junio points > out it would need to be improved to act as a generic filter, so

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

2018-03-05 Thread Phillip Wood
On 02/03/18 16:09, Junio C Hamano wrote: > SZEDER Gábor writes: > >>> +diff_cmp () { >>> + for x >>> + do >>> + sed -e '/^index/s/[0-9a-f]*[1-9a-f][0-9a-f]*\.\./1234567../' \ >>> +-e '/^index/s/\.\.[0-9a-f]*[1-9a-f][0-9a-f]*/..9abcdef/' \ >>>

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

2018-03-02 Thread Junio C Hamano
SZEDER Gábor writes: >> +diff_cmp () { >> +for x >> +do >> +sed -e '/^index/s/[0-9a-f]*[1-9a-f][0-9a-f]*\.\./1234567../' \ >> + -e '/^index/s/\.\.[0-9a-f]*[1-9a-f][0-9a-f]*/..9abcdef/' \ >> + -e '/^index/s/ 00*\.\./

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

2018-03-02 Thread SZEDER Gábor
> Use a filter when comparing diffs to fix the value of non-zero hashes > in diff index lines so we're not hard coding sha1 hash values in the > expected output. This makes it easier to change the expected output if > a test is edited as we don't need to worry about the exact hash value > and

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

2018-03-01 Thread Phillip Wood
From: Phillip Wood Use a filter when comparing diffs to fix the value of non-zero hashes in diff index lines so we're not hard coding sha1 hash values in the expected output. This makes it easier to change the expected output if a test is edited as we don't need to