Huynh Khoi Nguyen NGUYEN <Huynh-Khoi-Nguyen.Nguyen@xxxxxxxxxxxxxxx> writes: > +$XDG_CONFIG_HOME/git/config:: > + Second user-specific configuration file. ~/.gitconfig has priority. You should mention the behavior if $XDG_CONFIG_HOME is not set. > + if (home) { > + const char *xdg_config_home = getenv("XDG_CONFIG_HOME"); > + if (xdg_config_home) > + xdg_global = xstrdup(mkpath("%s/git/config", xdg_config_home)); > + else > + xdg_global = xstrdup(mkpath("%s/.config/git/config", home)); Shouldn't there be a helper function to get the path ~/.config/git/ and then append config? You're already computing this path twice, and we'll need more instances of it if we want to give default values to core.excludesfile and core.attributesfile in this directory too. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html