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

Function strip_extension

git.c:736–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734
735#ifdef STRIP_EXTENSION
736static void strip_extension(struct strvec *args)
737{
738 size_t len;
739
740 if (strip_suffix(args->v[0], STRIP_EXTENSION, &len)) {
741 char *stripped = xmemdupz(args->v[0], len);
742 strvec_replace(args, 0, stripped);
743 free(stripped);
744 }
745}
746#else
747#define strip_extension(cmd)
748#endif

Callers 1

handle_builtinFunction · 0.85

Calls 3

strip_suffixFunction · 0.85
xmemdupzFunction · 0.85
strvec_replaceFunction · 0.85

Tested by

no test coverage detected