MCPcopy Create free account
hub / github.com/git/git / parse_color_moved

Function parse_color_moved

diff.c:295–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295static int parse_color_moved(const char *arg)
296{
297 switch (git_parse_maybe_bool(arg)) {
298 case 0:
299 return COLOR_MOVED_NO;
300 case 1:
301 return COLOR_MOVED_DEFAULT;
302 default:
303 break;
304 }
305
306 if (!strcmp(arg, "no"))
307 return COLOR_MOVED_NO;
308 else if (!strcmp(arg, "plain"))
309 return COLOR_MOVED_PLAIN;
310 else if (!strcmp(arg, "blocks"))
311 return COLOR_MOVED_BLOCKS;
312 else if (!strcmp(arg, "zebra"))
313 return COLOR_MOVED_ZEBRA;
314 else if (!strcmp(arg, "default"))
315 return COLOR_MOVED_DEFAULT;
316 else if (!strcmp(arg, "dimmed-zebra"))
317 return COLOR_MOVED_ZEBRA_DIM;
318 else if (!strcmp(arg, "dimmed_zebra"))
319 return COLOR_MOVED_ZEBRA_DIM;
320 else
321 return error(_("color moved setting must be one of 'no', 'default', 'blocks', 'zebra', 'dimmed-zebra', 'plain'"));
322}
323
324static unsigned parse_color_moved_ws(const char *arg)
325{

Callers 2

git_diff_ui_configFunction · 0.85
diff_opt_color_movedFunction · 0.85

Calls 2

git_parse_maybe_boolFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected