summaryrefslogtreecommitdiff
path: root/t/t7814-grep-recurse-submodules.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-04-16 09:33:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-16 09:56:53 (GMT)
commitd9b8b8f896f92639f06708dcd641c0706fcfd6a4 (patch)
tree01dc890ff0b97dcf2709b4fa333affb7eedc7807 /t/t7814-grep-recurse-submodules.sh
parentec580eaaa3bdc2327d049932d1ebb2ca62aae837 (diff)
downloadgit-d9b8b8f896f92639f06708dcd641c0706fcfd6a4.zip
git-d9b8b8f896f92639f06708dcd641c0706fcfd6a4.tar.gz
git-d9b8b8f896f92639f06708dcd641c0706fcfd6a4.tar.bz2
submodule-config.c: use repo_get_oid for reading .gitmodules
Since 76e9bdc437 (submodule: support reading .gitmodules when it's not in the working tree - 2018-10-25), every time you do git grep --recurse-submodules you are likely to see one warning line per submodule (unless all those submodules also have submodules). On a superproject with plenty of submodules (I've seen one with 67) this is really annoying. The warning was there because we could not resolve extended SHA-1 syntax on a submodule. We can now. Make use of the new API and get rid of the warning. It would be even better if config_with_options() supports multiple repositories too. But one step at a time. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7814-grep-recurse-submodules.sh')
-rwxr-xr-xt/t7814-grep-recurse-submodules.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/t/t7814-grep-recurse-submodules.sh b/t/t7814-grep-recurse-submodules.sh
index fa475d5..134a6945 100755
--- a/t/t7814-grep-recurse-submodules.sh
+++ b/t/t7814-grep-recurse-submodules.sh
@@ -380,11 +380,7 @@ test_expect_success 'grep --recurse-submodules should pass the pattern type alon
fi
'
-# Recursing down into nested submodules which do not have .gitmodules in their
-# working tree does not work yet. This is because config_from_gitmodules()
-# uses get_oid() and the latter is still not able to get objects from an
-# arbitrary repository (the nested submodule, in this case).
-test_expect_failure 'grep --recurse-submodules with submodules without .gitmodules in the working tree' '
+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 &&