Skip to content

Commit 37ab8eb

Browse files
bk2204gitster
authored andcommitted
t4039: abstract away SHA-1-specific constants
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0370b35 commit 37ab8eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t4039-diff-assume-unchanged.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ test_expect_success 'setup' '
1212
git commit -m zero &&
1313
echo one > one &&
1414
echo two > two &&
15+
blob=$(git hash-object one) &&
1516
git add one two &&
1617
git commit -m onetwo &&
1718
git update-index --assume-unchanged one &&
@@ -20,7 +21,7 @@ test_expect_success 'setup' '
2021
'
2122

2223
test_expect_success 'diff-index does not examine assume-unchanged entries' '
23-
git diff-index HEAD^ -- one | grep -q 5626abf0f72e58d7a153368ba57db4c673c0e171
24+
git diff-index HEAD^ -- one | grep -q $blob
2425
'
2526

2627
test_expect_success 'diff-files does not examine assume-unchanged entries' '

0 commit comments

Comments
 (0)