From 32043c9f8c60fc03b0b6a324c559d98094729323 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 14 Feb 2007 12:48:14 +0100 Subject: config: read system-wide defaults from /etc/gitconfig The settings in /etc/gitconfig can be overridden in ~/.gitconfig, which in turn can be overridden in .git/config. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- config.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index d82107124..b0c0948cc 100644 --- a/config.c +++ b/config.c @@ -383,6 +383,8 @@ int git_config(config_fn_t fn) * config file otherwise. */ filename = getenv(CONFIG_ENVIRONMENT); if (!filename) { + if (!access(ETC_GITCONFIG, R_OK)) + ret += git_config_from_file(fn, ETC_GITCONFIG); home = getenv("HOME"); filename = getenv(CONFIG_LOCAL_ENVIRONMENT); if (!filename) -- cgit v1.2.1