diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-07-15 12:30:14 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-15 12:30:14 -0700 |
commit | abecddea25e9c39857b963c8a0cffbbdc135caa9 (patch) | |
tree | 2a3be062a6b4edf77cc4e974fec5049e6ce8b535 /diff.c | |
parent | Merge tag 'l10n-2.5.0-rnd1' of git://github.com/git-l10n/git-po (diff) | |
parent | diff: parse ws-error-highlight option more strictly (diff) | |
download | tgif-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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |