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>
Michael J Gruber committed
Apr 1, 2011 at 11:20 UTC
21d2616a7181472ae43e33d762a2733827cff9e9
1 file changed
+18
t/t1411-reflog-show.sh
+18
@@ -28,6 +28,24 @@ test_expect_success 'oneline reflog format' '
28
test_cmp expect actual
29
'
30
31
+test_expect_success 'reflog default format' '
32
+ git reflog -1 >actual &&
33
+ test_cmp expect actual
34
+'
35
+
36
+cat >expect <<'EOF'
37
+commit e46513e
38
+Reflog: HEAD@{0} (C O Mitter <committer@example.com>)
39
+Reflog message: commit (initial): one
40
+Author: A U Thor <author@example.com>
41
+
42
+ one
43
+EOF
44
+test_expect_failure 'override reflog default format' '
45
+ git reflog --format=short -1 >actual &&
46
+ test_cmp expect actual
47
+'
48
+
49
cat >expect <<'EOF'
50
Reflog: HEAD@{Thu Apr 7 15:13:13 2005 -0700} (C O Mitter <committer@example.com>)
51
Reflog message: commit (initial): one