зеркало из https://github.com/microsoft/git.git
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
This commit is contained in:
Коммит
abecddea25
7
diff.c
7
diff.c
|
@ -3653,7 +3653,12 @@ static void enable_patch_output(int *fmt) {
|
||||||
|
|
||||||
static int parse_one_token(const char **arg, const char *token)
|
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)
|
static int parse_ws_error_highlight(struct diff_options *opt, const char *arg)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче