merge-recursive: make "CONFLICT (rename/delete)" message show both paths
[gitweb.git] / t / t6300-for-each-ref.sh
index 19a2823025e794a6adc3f75d65dd175a2021f282..039509a9cb94ef5c653df09e0453ac83157bf184 100755 (executable)
@@ -553,4 +553,14 @@ test_expect_success 'Verify sort with multiple keys' '
                refs/tags/bogo refs/tags/master > actual &&
        test_cmp expected actual
 '
+
+test_expect_success 'do not dereference NULL upon %(HEAD) on unborn branch' '
+       test_when_finished "git checkout master" &&
+       git for-each-ref --format="%(HEAD) %(refname:short)" refs/heads/ >actual &&
+       sed -e "s/^\* /  /" actual >expect &&
+       git checkout --orphan HEAD &&
+       git for-each-ref --format="%(HEAD) %(refname:short)" refs/heads/ >actual &&
+       test_cmp expect actual
+'
+
 test_done