Allow the test suite to pass in a directory whose name contains spaces
[gitweb.git] / t / t3200-branch.sh
index 48d152b9a9519e00227a0877631d643ecf38e687..dd37ac47c5e16bc8df39bcc14e1a2861ab556374 100755 (executable)
@@ -162,6 +162,17 @@ test_expect_success 'git branch -M baz bam should add entries to .git/logs/HEAD'
        grep "^0\{40\}.*$msg$" .git/logs/HEAD
 '
 
+test_expect_success 'resulting reflog can be shown by log -g' '
+       oid=$(git rev-parse HEAD) &&
+       cat >expect <<-EOF &&
+       HEAD@{0} $oid $msg
+       HEAD@{1} $oid $msg
+       HEAD@{2} $oid checkout: moving from foo to baz
+       EOF
+       git log -g --format="%gd %H %gs" -3 HEAD >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'git branch -M baz bam should succeed when baz is checked out as linked working tree' '
        git checkout master &&
        git worktree add -b baz bazdir &&