submodule: submodule_move_head omits old argument in forced case
[gitweb.git] / t / t4208-log-magic-pathspec.sh
index 935df6a65cab2ba901856633baad7b2e38ebecfa..a1705f70cffe2332fc65f670797539986f330f70 100755 (executable)
@@ -93,4 +93,23 @@ test_expect_success 'command line pathspec parsing for "git log"' '
        git log --merge -- a
 '
 
+test_expect_success 'tree_entry_interesting does not match past submodule boundaries' '
+       test_when_finished "rm -rf repo submodule" &&
+       git init submodule &&
+       test_commit -C submodule initial &&
+       git init repo &&
+       >"repo/[bracket]" &&
+       git -C repo add "[bracket]" &&
+       test_tick &&
+       git -C repo commit -m bracket &&
+       git -C repo rev-list HEAD -- "[bracket]" >expect &&
+
+       git -C repo submodule add ../submodule &&
+       test_tick &&
+       git -C repo commit -m submodule &&
+
+       git -C repo rev-list HEAD -- "[bracket]" >actual &&
+       test_cmp expect actual
+'
+
 test_done