Code

Avoid segfault with 'git branch' when the HEAD is detached
[git.git] / git-submodule.sh
index 2f47e065fe8b7ca856f4527d6a507a28f1b2a06b..6cc2d334c08e1c3155c99087ca1e863400ffea23 100755 (executable)
@@ -59,7 +59,7 @@ resolve_relative_url ()
 #
 module_list()
 {
-       git ls-files --stage -- "$@" | grep '^160000 '
+       git ls-files --error-unmatch --stage -- "$@" | grep '^160000 '
 }
 
 #