Skip to content

Commit 60e0dc0

Browse files
bk2204gitster
authored andcommitted
t1507: abstract away SHA-1-specific constants
Adjust the test so that it uses a variable consisting of the current HEAD instead of a hard-coded hash. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d3438d1 commit 60e0dc0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t1507-rev-parse-upstream.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,9 @@ test_expect_success '@{u} works when tracking a local branch' '
209209
test refs/heads/master = "$(full_name @{u})"
210210
'
211211

212+
commit=$(git rev-parse HEAD)
212213
cat >expect <<EOF
213-
commit 8f489d01d0cc65c3b0f09504ec50b5ed02a70bd5
214+
commit $commit
214215
Reflog: master@{0} (C O Mitter <[email protected]>)
215216
Reflog message: branch: Created from HEAD
216217
Author: A U Thor <[email protected]>
@@ -224,7 +225,7 @@ test_expect_success 'log -g other@{u}' '
224225
'
225226

226227
cat >expect <<EOF
227-
commit 8f489d01d0cc65c3b0f09504ec50b5ed02a70bd5
228+
commit $commit
228229
Reflog: master@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <[email protected]>)
229230
Reflog message: branch: Created from HEAD
230231
Author: A U Thor <[email protected]>

0 commit comments

Comments
 (0)