]> Pileus Git - ~andy/git/blobdiff - git-submodule.sh
Merge branch 'dk/maint-t5150-dirname' into maint
[~andy/git] / git-submodule.sh
index 79bfaac9d4cb9a04e5e1fd7675d740cf9fc27e87..48bdf843244503df247e0dbdef3c5541cd9eb48e 100755 (executable)
@@ -113,7 +113,7 @@ resolve_relative_url ()
 module_list()
 {
        (
-               git ls-files --error-unmatch --stage -- "$@" ||
+               git ls-files -z --error-unmatch --stage -- "$@" ||
                echo "unmatched pathspec exists"
        ) |
        perl -e '
@@ -121,6 +121,7 @@ module_list()
        my ($null_sha1) = ("0" x 40);
        my @out = ();
        my $unmatched = 0;
+       $/ = "\0";
        while (<STDIN>) {
                if (/^unmatched pathspec/) {
                        $unmatched = 1;