Skip to content

Commit 9db8a6b

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge pull request #2370 from dscho/prettify-etc-gitconfig-path
config: normalize the path of the system gitconfig
2 parents 7331a53 + c42e98d commit 9db8a6b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

config.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,9 +1662,11 @@ static int git_config_from_blob_ref(config_fn_t fn,
16621662

16631663
const char *git_etc_gitconfig(void)
16641664
{
1665-
static const char *system_wide;
1666-
if (!system_wide)
1665+
static char *system_wide;
1666+
if (!system_wide) {
16671667
system_wide = system_path(ETC_GITCONFIG);
1668+
normalize_path_copy(system_wide, system_wide);
1669+
}
16681670
return system_wide;
16691671
}
16701672

0 commit comments

Comments
 (0)