module_list()
{
(
- git ls-files --error-unmatch --stage -- "$@" ||
+ git ls-files -z --error-unmatch --stage -- "$@" ||
echo "unmatched pathspec exists"
) |
perl -e '
my ($null_sha1) = ("0" x 40);
my @out = ();
my $unmatched = 0;
+ $/ = "\0";
while (<STDIN>) {
if (/^unmatched pathspec/) {
$unmatched = 1;
test -n "$(git config --get-regexp "submodule\.example\.")"
'
+test_expect_success 'submodule with strange name works "å äö"' '
+ mkdir "å äö" &&
+ (
+ cd "å äö" &&
+ git init &&
+ touch sub
+ git add sub
+ git commit -m "init sub"
+ )
+ git submodule add "/å äö" &&
+ test -n "$(git submodule | grep "å äö")"
+'
test_done