Merge branch 'an/ignore-doc-update' into maint
[gitweb.git] / t / t7814-grep-recurse-submodules.sh
index 7184113b9b2b381a6e7e0def8a8c1ba06771f8a6..134a694516c924c5930b9c227da45e896297a338 100755 (executable)
@@ -380,4 +380,16 @@ test_expect_success 'grep --recurse-submodules should pass the pattern type alon
        fi
 '
 
+test_expect_success 'grep --recurse-submodules with submodules without .gitmodules in the working tree' '
+       test_when_finished "git -C submodule checkout .gitmodules" &&
+       rm submodule/.gitmodules &&
+       git grep --recurse-submodules -e "(.|.)[\d]" >actual &&
+       cat >expect <<-\EOF &&
+       a:(1|2)d(3|4)
+       submodule/a:(1|2)d(3|4)
+       submodule/sub/a:(1|2)d(3|4)
+       EOF
+       test_cmp expect actual
+'
+
 test_done