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

Function parse_mode_line

apply.c:994–1009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

992}
993
994static int parse_mode_line(const char *line,
995 const char *patch_input_file,
996 int linenr,
997 unsigned int *mode)
998{
999 char *end;
1000 *mode = strtoul(line, &end, 8);
1001 if (end == line || !isspace(*end)) {
1002 if (patch_input_file)
1003 return error(_("invalid mode at %s:%d: %s"),
1004 patch_input_file, linenr, line);
1005 return error(_("invalid mode on line %d: %s"), linenr, line);
1006 }
1007 *mode = canon_mode(*mode);
1008 return 0;
1009}
1010
1011static int gitdiff_oldmode(struct gitdiff_data *state,
1012 const char *line,

Callers 2

gitdiff_oldmodeFunction · 0.85
gitdiff_newmodeFunction · 0.85

Calls 2

errorFunction · 0.85
canon_modeFunction · 0.85

Tested by

no test coverage detected