From 21d2616a7181472ae43e33d762a2733827cff9e9 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Fri, 1 Apr 2011 11:20:32 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- t/t1411-reflog-show.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 't/t1411-reflog-show.sh') 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 ) +Reflog message: commit (initial): one +Author: A U Thor + + 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 ) Reflog message: commit (initial): one -- cgit v1.2.3 From 4b56cf58a9ee684d47e01d815eccd75252d61da5 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Fri, 1 Apr 2011 11:20:33 +0200 Subject: reflog: fix overriding of command line options Currently, "git reflog" overrides some command line options such as "--format". Fix this by using the new 2-phase version of cmd_log_init(). Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- t/t1411-reflog-show.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t1411-reflog-show.sh') diff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh index 88dc6a781b..caa687b5b4 100755 --- a/t/t1411-reflog-show.sh +++ b/t/t1411-reflog-show.sh @@ -41,7 +41,7 @@ Author: A U Thor one EOF -test_expect_failure 'override reflog default format' ' +test_expect_success 'override reflog default format' ' git reflog --format=short -1 >actual && test_cmp expect actual ' -- cgit v1.2.3