]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t4010-diff-pathspec.sh
tree-walk.c: ignore trailing slash on submodule in tree_entry_interesting()
[thirdparty/git.git] / t / t4010-diff-pathspec.sh
index af5134b70c6b4898aa652907d58191d45aa30ac4..15a491295ed3b85cb4a66d46e720e352787a8344 100755 (executable)
@@ -110,4 +110,21 @@ test_expect_success 'diff-tree -r with wildcard' '
        test_cmp expected result
 '
 
+test_expect_success 'setup submodules' '
+       test_tick &&
+       git init submod &&
+       ( cd submod && test_commit first; ) &&
+       git add submod &&
+       git commit -m first &&
+       ( cd submod && test_commit second; ) &&
+       git add submod &&
+       git commit -m second
+'
+
+test_expect_success 'diff-tree ignores trailing slash on submodule path' '
+       git diff --name-only HEAD^ HEAD submod >expect &&
+       git diff --name-only HEAD^ HEAD submod/ >actual &&
+       test_cmp expect actual
+'
+
 test_done