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:
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 135b22231c..7deac90532 100644
--- a/diff.c
+++ b/diff.c
@@ -3653,7 +3653,12 @@ static void enable_patch_output(int *fmt) {
static int parse_one_token(const char **arg, const char *token)
{
- return skip_prefix(*arg, token, arg) && (!**arg || **arg == ',');
+ const char *rest;
+ if (skip_prefix(*arg, token, &rest) && (!*rest || *rest == ',')) {
+ *arg = rest;
+ return 1;
+ }
+ return 0;
}
static int parse_ws_error_highlight(struct diff_options *opt, const char *arg)