Skip to content

Commit 62814df

Browse files
bk2204gitster
authored andcommitted
t9109: make test hash independent
Instead of stripping off the first 41 characters of git log output, let's just strip off the first space-separated component, which will work for any size hash. Signed-off-by: brian m. carlson <[email protected]> Acked-by: Eric Wong <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3716d50 commit 62814df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t9109-git-svn-multi-glob.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ test_expect_success 'test refspec globbing' '
4848
"tags/*/src/a:refs/remotes/tags/*" &&
4949
git svn multi-fetch &&
5050
git log --pretty=oneline refs/remotes/tags/end >actual &&
51-
sed -e "s/^.\{41\}//" actual >output.end &&
51+
cut -d" " -f2- actual >output.end &&
5252
test_cmp expect.end output.end &&
5353
test "$(git rev-parse refs/remotes/tags/end~1)" = \
5454
"$(git rev-parse refs/remotes/branches/v1/start)" &&
@@ -84,7 +84,7 @@ test_expect_success 'test left-hand-side only globbing' '
8484
test $(git rev-parse refs/remotes/two/tags/end~3) = \
8585
$(git rev-parse refs/remotes/two/branches/v1/start) &&
8686
git log --pretty=oneline refs/remotes/two/tags/end >actual &&
87-
sed -e "s/^.\{41\}//" actual >output.two &&
87+
cut -d" " -f2- actual >output.two &&
8888
test_cmp expect.two output.two
8989
'
9090
cat > expect.four <<EOF
@@ -135,7 +135,7 @@ test_expect_success 'test another branch' '
135135
test $(git rev-parse refs/remotes/four/tags/next~2) = \
136136
$(git rev-parse refs/remotes/four/branches/v2/start) &&
137137
git log --pretty=oneline refs/remotes/four/tags/next >actual &&
138-
sed -e "s/^.\{41\}//" actual >output.four &&
138+
cut -d" " -f2- actual >output.four &&
139139
test_cmp expect.four output.four
140140
'
141141

0 commit comments

Comments
 (0)