summaryrefslogtreecommitdiff
path: root/t/t1411-reflog-show.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2011-04-01 11:20:32 +0200
committerJunio C Hamano <gitster@pobox.com>2011-04-01 14:42:29 -0700
commit21d2616a7181472ae43e33d762a2733827cff9e9 (patch)
tree8a063982b8caa633472b917c0978bfbed3b67e62 /t/t1411-reflog-show.sh
parentef803fd4b09bca707c7c27669a2789bb050b488c (diff)
downloadgit-21d2616a7181472ae43e33d762a2733827cff9e9.tar.gz
t/t1411: test reflog with formats
"git reflog --format=short" does not work because "reflog" overrides the format option. This is documented in code. Document this by a test (known failure) also. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1411-reflog-show.sh')
-rwxr-xr-xt/t1411-reflog-show.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh
index ba25ff354d..88dc6a781b 100755
--- a/t/t1411-reflog-show.sh
+++ b/t/t1411-reflog-show.sh
@@ -28,6 +28,24 @@ test_expect_success 'oneline reflog format' '
test_cmp expect actual
'
+test_expect_success 'reflog default format' '
+ git reflog -1 >actual &&
+ test_cmp expect actual
+'
+
+cat >expect <<'EOF'
+commit e46513e
+Reflog: HEAD@{0} (C O Mitter <committer@example.com>)
+Reflog message: commit (initial): one
+Author: A U Thor <author@example.com>
+
+ one
+EOF
+test_expect_failure 'override reflog default format' '
+ git reflog --format=short -1 >actual &&
+ test_cmp expect actual
+'
+
cat >expect <<'EOF'
Reflog: HEAD@{Thu Apr 7 15:13:13 2005 -0700} (C O Mitter <committer@example.com>)
Reflog message: commit (initial): one