author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Mon, 19 Jun 2006 22:51:58 +0000 (00:51 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 20 Jun 2006 00:30:34 +0000 (17:30 -0700) | ||
commit | 9c3796fc0474ac6fc77da4886a246a37a7fbe856 | |
tree | 7baefcb350040242e902861ae07b72a26421038a | tree | snapshot |
parent | 7f29f7a95c906250c9c99d08242c2c4084c48d24 | commit | diff |
Fix setting config variables with an alternative GIT_CONFIG
When setting a config variable, git_config_set() ignored the variables
GIT_CONFIG and GIT_CONFIG_LOCAL. Now, when GIT_CONFIG_LOCAL is set, it
will write to that file. If not, GIT_CONFIG is checked, and only as a
fallback, the change is written to $GIT_DIR/config.
Add a test for it, and also future-proof the test for the upcoming
$HOME/.gitconfig support.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When setting a config variable, git_config_set() ignored the variables
GIT_CONFIG and GIT_CONFIG_LOCAL. Now, when GIT_CONFIG_LOCAL is set, it
will write to that file. If not, GIT_CONFIG is checked, and only as a
fallback, the change is written to $GIT_DIR/config.
Add a test for it, and also future-proof the test for the upcoming
$HOME/.gitconfig support.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
config.c | diff | blob | history | |
t/Makefile | diff | blob | history | |
t/t1300-repo-config.sh | diff | blob | history |