summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-07-15 12:30:14 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-07-15 12:30:14 -0700
commitabecddea25e9c39857b963c8a0cffbbdc135caa9 (patch)
tree2a3be062a6b4edf77cc4e974fec5049e6ce8b535 /diff.c
parentMerge tag 'l10n-2.5.0-rnd1' of git://github.com/git-l10n/git-po (diff)
parentdiff: parse ws-error-highlight option more strictly (diff)
downloadtgif-abecddea25e9c39857b963c8a0cffbbdc135caa9.tar.xz
Merge branch 'jc/diff-ws-error-highlight'
A hotfix to a new feature in 2.5.0-rc. * jc/diff-ws-error-highlight: diff: parse ws-error-highlight option more strictly
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 87b16d5613..0f17ec5506 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)