@@ -12,22 +12,25 @@ test_expect_success 'setup' '
12
12
echo c >>file &&
13
13
echo d >>file &&
14
14
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)"
16
20
'
17
21
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
23
27
EOF
24
28
test_expect_success ' normal blame output' '
25
- git blame file >actual &&
29
+ git blame --abbrev=17 file >actual &&
26
30
test_cmp expect actual
27
31
'
28
32
29
- ID1=baf5e0b3869e0b2b2beb395a3720c7b51eac94fc
30
- COMMIT1=' author A U Thor
33
+ COMMIT1=" author A U Thor
31
34
32
35
author-time 1112911993
33
36
author-tz -0700
@@ -37,9 +40,8 @@ committer-time 1112911993
37
40
committer-tz -0700
38
41
summary one
39
42
boundary
40
- filename file'
41
- ID2=8825379dfb8a1267b58e8e5bcf69eec838f685ec
42
- COMMIT2=' author A U Thor
43
+ filename file"
44
+ COMMIT2=" author A U Thor
43
45
44
46
author-time 1112912053
45
47
author-tz -0700
48
50
committer-time 1112912053
49
51
committer-tz -0700
50
52
summary two
51
- previous baf5e0b3869e0b2b2beb395a3720c7b51eac94fc file
52
- filename file'
53
+ previous $ID1 file
54
+ filename file"
53
55
54
56
cat > expect << EOF
55
57
$ID1 1 1 1
0 commit comments