summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-04-27 11:36:41 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-04-27 11:36:41 -0700
commit95fd6e21f1e7656d3760346ec08b2d43133cba9c (patch)
tree68c9c6308b455ce4edda5a06152e19ee00016a78 /t
parentMerge branch 'ar/clean-rmdir-empty' (diff)
parentreflog: fix overriding of command line options (diff)
downloadtgif-95fd6e21f1e7656d3760346ec08b2d43133cba9c.tar.xz
Merge branch 'mg/reflog-with-options'
* mg/reflog-with-options: reflog: fix overriding of command line options t/t1411: test reflog with formats builtin/log.c: separate default and setup of cmd_log_init()
Diffstat (limited to 't')
-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..caa687b5b4 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_success '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