Merge branch 'mm/config-edit-global'
Start "git config --edit --global" from a skeletal per-user configuration file contents, instead of a total blank, when the user does not already have any. This immediately reduces the need for a later "Have you forgotten setting core.user?" and we can add more to the template as we gain more experience. * mm/config-edit-global: commit: advertise config --global --edit on guessed identity home_config_paths(): let the caller ignore xdg path config --global --edit: create a template file if needed
This commit is contained in:
10
path.c
10
path.c
@ -148,10 +148,12 @@ void home_config_paths(char **global, char **xdg, char *file)
|
||||
*global = mkpathdup("%s/.gitconfig", home);
|
||||
}
|
||||
|
||||
if (!xdg_home)
|
||||
*xdg = NULL;
|
||||
else
|
||||
*xdg = mkpathdup("%s/git/%s", xdg_home, file);
|
||||
if (xdg) {
|
||||
if (!xdg_home)
|
||||
*xdg = NULL;
|
||||
else
|
||||
*xdg = mkpathdup("%s/git/%s", xdg_home, file);
|
||||
}
|
||||
|
||||
free(to_free);
|
||||
}
|
||||
|
Reference in New Issue
Block a user