Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Possibility to read both from ~/.gitconfig and from $XDG_CONFIG_HOME/git/config

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:53:57

Huynh Khoi Nguyen NGUYEN [off-list ref]
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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help