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

Function strip_prefix

diff.c:5009–5022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5007}
5008
5009static void strip_prefix(int prefix_length, const char **namep, const char **otherp)
5010{
5011 /* Strip the prefix but do not molest /dev/null and absolute paths */
5012 if (*namep && !is_absolute_path(*namep)) {
5013 *namep += prefix_length;
5014 if (**namep == '/')
5015 ++*namep;
5016 }
5017 if (*otherp && !is_absolute_path(*otherp)) {
5018 *otherp += prefix_length;
5019 if (**otherp == '/')
5020 ++*otherp;
5021 }
5022}
5023
5024static void run_diff(struct diff_filepair *p, struct diff_options *o)
5025{

Callers 5

run_diffFunction · 0.85
run_diffstatFunction · 0.85
run_checkdiffFunction · 0.85
diff_flush_rawFunction · 0.85
flush_one_pairFunction · 0.85

Calls 1

is_absolute_pathFunction · 0.85

Tested by

no test coverage detected