Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> --- builtin/list-files.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/list-files.c b/builtin/list-files.c index b99f2b7..c444a53 100644 --- a/builtin/list-files.c +++ b/builtin/list-files.c @@ -3,6 +3,7 @@ #include "parse-options.h" #include "pathspec.h" #include "dir.h" +#include "quote.h" static struct pathspec pathspec; static const char *prefix; @@ -22,7 +23,7 @@ static void add_one(struct string_list *result, const char *name) struct strbuf sb = STRBUF_INIT; struct string_list_item *item; - strbuf_addstr(&sb, name); + quote_path_relative(name, prefix_length ? prefix : NULL, &sb); item = string_list_append(result, strbuf_detach(&sb, NULL)); item->util = (char *)name; } -- 2.3.0.rc1.137.g477eb31 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html