From: Derrick Stolee Date: Tue, 08 Oct 2019 12:31:24 GMT Subject: Re: [PATCH 08/15] t4015: abstract away SHA-1-specific constants Message-ID: In-Reply-To: <20191005211209.18237-9-sandals@crustytoothpaste.net> On 10/5/2019 5:12 PM, brian m. carlson wrote: > Adjust the test so that it computes variables for object IDs instead of > using hard-coded hashes. > > Signed-off-by: brian m. carlson > --- > t/t4015-diff-whitespace.sh | 89 +++++++++++++++++++++++--------------- > 1 file changed, 53 insertions(+), 36 deletions(-) > > diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh > index 6b087df3dc..eadaf57262 100755 > --- a/t/t4015-diff-whitespace.sh > +++ b/t/t4015-diff-whitespace.sh > @@ -16,6 +16,7 @@ test_expect_success "Ray Lehtiniemi's example" ' > } while (0); > EOF > git update-index --add x && > + before=$(git rev-parse --short $(git hash-object x)) && I see you are using $(git hash-object ) here (no printf). Seems like you could use the same pattern in the previous patch. -Stolee