git: 9front

Download patch

ref: b5e6326f1e8b2dd8f216a21a8884760b4e14c5be
parent: cceaf57c0dd28f75ff949d6dde963daf33ba44fc
author: kemal <kemalinanc8@gmail.com>
date: Tue Jun 8 16:13:57 EDT 2021

git/conf: check in /sys/lib/git/config as a fallback to user-wide config

--- a/sys/man/1/git
+++ b/sys/man/1/git
@@ -631,8 +631,12 @@
 The configuration file for a repository.
 .TP
 $home/lib/git/config
-The global configuration for git.
+The user-wide configuration for git.
 The contents of this file are used as fallbacks for the per-repository config.
+.TP
+/sys/lib/git/config
+The system-wide configuration for git.
+The contents of this file are used as fallbacks for the per-user config.
 
 .SH SEE ALSO
 .IR hg (1)
--- a/sys/src/cmd/git/conf.c
+++ b/sys/src/cmd/git/conf.c
@@ -78,6 +78,7 @@
 		file[nfile++] = ".git/config";
 		if((p = getenv("home")) != nil)
 			file[nfile++] = smprint("%s/lib/git/config", p);
+		file[nfile++] = "/sys/lib/git/config";
 	}
 
 	for(i = 0; i < argc; i++){
--