summaryrefslogtreecommitdiff
path: root/builtin/fast-export.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-09 16:02:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-09 16:02:06 (GMT)
commitf8a9eafb4895935be6c9debf02a9b04339488bf0 (patch)
tree30a8f65cc8340a0c14a3a1ae51f3ecda744da803 /builtin/fast-export.c
parent45c96c0c8264975519c595afa37136c488f7017a (diff)
parentff59f6da840bb58058fef06721a2646daae50509 (diff)
downloadgit-f8a9eafb4895935be6c9debf02a9b04339488bf0.zip
git-f8a9eafb4895935be6c9debf02a9b04339488bf0.tar.gz
git-f8a9eafb4895935be6c9debf02a9b04339488bf0.tar.bz2
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
Diffstat (limited to 'builtin/fast-export.c')
-rw-r--r--builtin/fast-export.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index ef7c012..9ab6db3 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -185,6 +185,8 @@ static void print_path(const char *path)
int need_quote = quote_c_style(path, NULL, NULL, 0);
if (need_quote)
quote_c_style(path, NULL, stdout, 0);
+ else if (strchr(path, ' '))
+ printf("\"%s\"", path);
else
printf("%s", path);
}