@@ -12,22 +12,25 @@ test_expect_success 'setup' '
1212 echo c >>file &&
1313 echo d >>file &&
1414 test_tick &&
15- git commit -a -m two
15+ git commit -a -m two &&
16+ ID1=$(git rev-parse HEAD^) &&
17+ shortID1="^$(git rev-parse HEAD^ |cut -c 1-17)" &&
18+ ID2=$(git rev-parse HEAD) &&
19+ shortID2="$(git rev-parse HEAD |cut -c 1-18)"
1620'
1721
18- cat > expect << ' EOF '
19- ^baf5e0b (A U Thor 2005-04-07 15:13:13 -0700 1) a
20- 8825379d (A U Thor 2005-04-07 15:14:13 -0700 2) b
21- 8825379d (A U Thor 2005-04-07 15:14:13 -0700 3) c
22- 8825379d (A U Thor 2005-04-07 15:14:13 -0700 4) d
22+ cat > expect << EOF
23+ $shortID1 (A U Thor 2005-04-07 15:13:13 -0700 1) a
24+ $shortID2 (A U Thor 2005-04-07 15:14:13 -0700 2) b
25+ $shortID2 (A U Thor 2005-04-07 15:14:13 -0700 3) c
26+ $shortID2 (A U Thor 2005-04-07 15:14:13 -0700 4) d
2327EOF
2428test_expect_success ' normal blame output' '
25- git blame file >actual &&
29+ git blame --abbrev=17 file >actual &&
2630 test_cmp expect actual
2731'
2832
29- ID1=baf5e0b3869e0b2b2beb395a3720c7b51eac94fc
30- COMMIT1=' author A U Thor
33+ COMMIT1=" author A U Thor
3134author-mail <author@example.com>
3235author-time 1112911993
3336author-tz -0700
@@ -37,9 +40,8 @@ committer-time 1112911993
3740committer-tz -0700
3841summary one
3942boundary
40- filename file'
41- ID2=8825379dfb8a1267b58e8e5bcf69eec838f685ec
42- COMMIT2=' author A U Thor
43+ filename file"
44+ COMMIT2=" author A U Thor
4345author-mail <author@example.com>
4446author-time 1112912053
4547author-tz -0700
@@ -48,8 +50,8 @@ committer-mail <committer@example.com>
4850committer-time 1112912053
4951committer-tz -0700
5052summary two
51- previous baf5e0b3869e0b2b2beb395a3720c7b51eac94fc file
52- filename file'
53+ previous $ID1 file
54+ filename file"
5355
5456cat > expect << EOF
5557$ID1 1 1 1
0 commit comments