Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-19 03:58:04 +0300
committerJunio C Hamano <gitster@pobox.com>2020-09-19 03:58:04 +0300
commit9d4e7ec4d9e695d95cc7474f59fba8cc38580e29 (patch)
tree22db63f4315c0e6698d67c879c73520ef4074c39 /diff.c
parent2ce9d4e5c7186e15f2e2f7be06a9db52b5e61bde (diff)
parent7c37c9750a0b402a68c73d0e4644f538a026d121 (diff)
Merge branch 'jc/quote-path-cleanup'
"git status --short" quoted a path with SP in it when tracked, but not those that are untracked, ignored or unmerged. They are all shown quoted consistently. * jc/quote-path-cleanup: quote: turn 'nodq' parameter into a set of flags quote: rename misnamed sq_lookup[] to cq_lookup[] wt-status: consistently quote paths in "status --short" output quote_path: code clarification quote_path: optionally allow quoting a path with SP in it quote_path: give flags parameter to quote_path() quote_path: rename quote_path_relative() to quote_path()
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/diff.c b/diff.c
index a5114fa864..ee8e8189e9 100644
--- a/diff.c
+++ b/diff.c
@@ -482,14 +482,14 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
static char *quote_two(const char *one, const char *two)
{
- int need_one = quote_c_style(one, NULL, NULL, 1);
- int need_two = quote_c_style(two, NULL, NULL, 1);
+ int need_one = quote_c_style(one, NULL, NULL, CQUOTE_NODQ);
+ int need_two = quote_c_style(two, NULL, NULL, CQUOTE_NODQ);
struct strbuf res = STRBUF_INIT;
if (need_one + need_two) {
strbuf_addch(&res, '"');
- quote_c_style(one, &res, NULL, 1);
- quote_c_style(two, &res, NULL, 1);
+ quote_c_style(one, &res, NULL, CQUOTE_NODQ);
+ quote_c_style(two, &res, NULL, CQUOTE_NODQ);
strbuf_addch(&res, '"');
} else {
strbuf_addstr(&res, one);