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

Function normalize_ceiling_entry

t/helper/test-path-utils.c:20–32  ·  view source on GitHub ↗

* A "string_list_each_func_t" function that normalizes an entry from * GIT_CEILING_DIRECTORIES. If the path is unusable for some reason, * die with an explanation. */

Source from the content-addressed store, hash-verified

18 * die with an explanation.
19 */
20static int normalize_ceiling_entry(struct string_list_item *item,
21 void *data UNUSED)
22{
23 char *ceil = item->string;
24
25 if (!*ceil)
26 die("Empty path is not supported");
27 if (!is_absolute_path(ceil))
28 die("Path \"%s\" is not absolute", ceil);
29 if (normalize_path_copy(ceil, ceil) < 0)
30 die("Path \"%s\" could not be normalized", ceil);
31 return 1;
32}
33
34static void normalize_argv_string(const char **var, const char *input)
35{

Callers

nothing calls this directly

Calls 3

is_absolute_pathFunction · 0.85
normalize_path_copyFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected