summaryrefslogtreecommitdiff
path: root/t/t1507-rev-parse-upstream.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-03-25 19:20:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-26 22:10:48 (GMT)
commit60e0dc0bd88750fc0a04b9c41dfa4616c131dd99 (patch)
tree4732e00b02bfcf50b8ac56c4af662e5f12b88b3a /t/t1507-rev-parse-upstream.sh
parentd3438d1a09c35e4c9cffd14aa67fa9722559e87a (diff)
downloadgit-60e0dc0bd88750fc0a04b9c41dfa4616c131dd99.zip
git-60e0dc0bd88750fc0a04b9c41dfa4616c131dd99.tar.gz
git-60e0dc0bd88750fc0a04b9c41dfa4616c131dd99.tar.bz2
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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1507-rev-parse-upstream.sh')
-rwxr-xr-xt/t1507-rev-parse-upstream.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index 2ce68cc..93c77ea 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -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>