Merge branch 'js/fast-export-paths-with-spaces'
"git fast-export" produced an input stream for fast-import without properly quoting pathnames when they contain SPs in them. * js/fast-export-paths-with-spaces: fast-export: quote paths with spaces
This commit is contained in:
commit
f8a9eafb48
@ -185,6 +185,8 @@ static void print_path(const char *path)
|
|||||||
int need_quote = quote_c_style(path, NULL, NULL, 0);
|
int need_quote = quote_c_style(path, NULL, NULL, 0);
|
||||||
if (need_quote)
|
if (need_quote)
|
||||||
quote_c_style(path, NULL, stdout, 0);
|
quote_c_style(path, NULL, stdout, 0);
|
||||||
|
else if (strchr(path, ' '))
|
||||||
|
printf("\"%s\"", path);
|
||||||
else
|
else
|
||||||
printf("%s", path);
|
printf("%s", path);
|
||||||
}
|
}
|
||||||
|
@ -430,7 +430,7 @@ test_expect_success 'fast-export quotes pathnames' '
|
|||||||
git commit -m rename &&
|
git commit -m rename &&
|
||||||
git read-tree --empty &&
|
git read-tree --empty &&
|
||||||
git commit -m deletion &&
|
git commit -m deletion &&
|
||||||
git fast-export HEAD >export.out &&
|
git fast-export -M HEAD >export.out &&
|
||||||
git rev-list HEAD >expect &&
|
git rev-list HEAD >expect &&
|
||||||
git init result &&
|
git init result &&
|
||||||
cd result &&
|
cd result &&
|
||||||
|
Loading…
Reference in New Issue
Block a user