]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1507: abstract away SHA-1-specific constants
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 25 Mar 2018 19:20:51 +0000 (19:20 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Mar 2018 22:10:48 +0000 (15:10 -0700)
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 <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1507-rev-parse-upstream.sh

index 2ce68cc277a1ed742ce7b644de31a4a847e3529b..93c77eac45321cb24823431c4d89dc393049edbf 100755 (executable)
@@ -209,8 +209,9 @@ test_expect_success '@{u} works when tracking a local branch' '
        test refs/heads/master = "$(full_name @{u})"
 '
 
+commit=$(git rev-parse HEAD)
 cat >expect <<EOF
-commit 8f489d01d0cc65c3b0f09504ec50b5ed02a70bd5
+commit $commit
 Reflog: master@{0} (C O Mitter <committer@example.com>)
 Reflog message: branch: Created from HEAD
 Author: A U Thor <author@example.com>
@@ -224,7 +225,7 @@ test_expect_success 'log -g other@{u}' '
 '
 
 cat >expect <<EOF
-commit 8f489d01d0cc65c3b0f09504ec50b5ed02a70bd5
+commit $commit
 Reflog: master@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <committer@example.com>)
 Reflog message: branch: Created from HEAD
 Author: A U Thor <author@example.com>