summaryrefslogtreecommitdiff
path: root/t/t1507-rev-parse-upstream.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-26 13:48:28 -0800
committerJunio C Hamano <gitster@pobox.com>2010-01-26 13:49:50 -0800
commit105e47339794ec2c862338d7a25df77b7d72385e (patch)
tree1cb3327d57a774868e62dc6f4593e7aa97dedfeb /t/t1507-rev-parse-upstream.sh
parente3f67d30b20e49d8fc3eefe819808cba7998b060 (diff)
downloadgit-105e47339794ec2c862338d7a25df77b7d72385e.tar.gz
Fix log -g this@{upstream}
It showed the correct objects but walked a wrong reflog. Again, tests are from Jeff King. 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.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index 95c9b0923f..8c8dfdaf9f 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -107,4 +107,33 @@ test_expect_success 'checkout other@{u}' '
test_cmp expect actual
'
+cat >expect <<EOF
+commit 8f489d01d0cc65c3b0f09504ec50b5ed02a70bd5
+Reflog: master@{0} (C O Mitter <committer@example.com>)
+Reflog message: branch: Created from HEAD
+Author: A U Thor <author@example.com>
+Date: Thu Apr 7 15:15:13 2005 -0700
+
+ 3
+EOF
+test_expect_success 'log -g other@{u}' '
+ git log -1 -g other@{u} >actual &&
+ test_cmp expect actual
+'
+
+cat >expect <<EOF
+commit 8f489d01d0cc65c3b0f09504ec50b5ed02a70bd5
+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>
+Date: Thu Apr 7 15:15:13 2005 -0700
+
+ 3
+EOF
+
+test_expect_success 'log -g other@{u}@{now}' '
+ git log -1 -g other@{u}@{now} >actual &&
+ test_cmp expect actual
+'
+
test_done