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

Function cd_to_homedir

shell.c:40–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static void cd_to_homedir(void)
41{
42 const char *home = getenv("HOME");
43 if (!home)
44 die("could not determine user's home directory; HOME is unset");
45 if (chdir(home) == -1)
46 die("could not chdir to user's home directory");
47}
48
49#define MAX_INTERACTIVE_COMMAND (4*1024*1024)
50

Callers 1

cmd_mainFunction · 0.85

Calls 2

chdirFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected