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

Function squash_slash

apply.c:448–462  ·  view source on GitHub ↗

remove double slashes to make --index work with such filenames */

Source from the content-addressed store, hash-verified

446
447/* remove double slashes to make --index work with such filenames */
448static char *squash_slash(char *name)
449{
450 int i = 0, j = 0;
451
452 if (!name)
453 return NULL;
454
455 while (name[i]) {
456 if ((name[j++] = name[i++]) == '/')
457 while (name[i] == '/')
458 i++;
459 }
460 name[j] = '\0';
461 return name;
462}
463
464static char *find_name_gnu(struct strbuf *root,
465 const char *line,

Callers 2

find_name_gnuFunction · 0.85
find_name_commonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected