Code

fix hang in git fetch if pointed at a 0 length bundle
[git.git] / t / t1411-reflog-show.sh
index c18ed8edf994f3d701ab1d01c2e05b2585174d31..caa687b5b46cea65ed16c70c29cc11e9e8b771f1 100755 (executable)
@@ -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
@@ -64,4 +82,13 @@ test_expect_success 'using --date= shows reflog date (oneline)' '
        test_cmp expect actual
 '
 
+: >expect
+test_expect_success 'empty reflog file' '
+       git branch empty &&
+       : >.git/logs/refs/heads/empty &&
+
+       git log -g empty >actual &&
+       test_cmp expect actual
+'
+
 test_done