MCPcopy Index your code
hub / github.com/git/git / parse_ws_error_highlight

Function parse_ws_error_highlight

diff.c:249–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249static int parse_ws_error_highlight(const char *arg)
250{
251 const char *orig_arg = arg;
252 unsigned val = 0;
253
254 while (*arg) {
255 if (parse_one_token(&arg, "none"))
256 val = 0;
257 else if (parse_one_token(&arg, "default"))
258 val = WSEH_NEW;
259 else if (parse_one_token(&arg, "all"))
260 val = WSEH_NEW | WSEH_OLD | WSEH_CONTEXT;
261 else if (parse_one_token(&arg, "new"))
262 val |= WSEH_NEW;
263 else if (parse_one_token(&arg, "old"))
264 val |= WSEH_OLD;
265 else if (parse_one_token(&arg, "context"))
266 val |= WSEH_CONTEXT;
267 else {
268 return -1 - (int)(arg - orig_arg);
269 }
270 if (*arg)
271 arg++;
272 }
273 return val;
274}
275
276/*
277 * These are to give UI layer defaults.

Callers 2

git_diff_basic_configFunction · 0.85

Calls 1

parse_one_tokenFunction · 0.85

Tested by

no test coverage detected