Skip to content

Commit 8befc50

Browse files
dschogitster
authored andcommitted
Get rid of the last remnants of GIT_CONFIG_LOCAL
In dc87183(Only use GIT_CONFIG in "git config", not other programs), GIT_CONFIG_LOCAL was rested in peace, in favor of not reading /etc/gitconfig and $HOME/.gitconfig at all when GIT_CONFIG is set. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 390c348 commit 8befc50

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

config.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,7 @@ int git_config(config_fn_t fn, void *data)
636636
char *repo_config = NULL;
637637
const char *home = NULL;
638638

639-
/* $GIT_CONFIG makes git read _only_ the given config file,
640-
* $GIT_CONFIG_LOCAL will make it process it in addition to the
641-
* global config file, the same way it would the per-repository
642-
* config file otherwise. */
639+
/* Setting $GIT_CONFIG makes git read _only_ the given config file. */
643640
if (config_exclusive_filename)
644641
return git_config_from_file(fn, config_exclusive_filename, data);
645642
if (git_config_system() && !access(git_etc_gitconfig(), R_OK))

git-svn.perl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5015,8 +5015,7 @@ sub minimize_connections {
50155015
}
50165016
}
50175017
if (@emptied) {
5018-
my $file = $ENV{GIT_CONFIG} || $ENV{GIT_CONFIG_LOCAL} ||
5019-
"$ENV{GIT_DIR}/config";
5018+
my $file = $ENV{GIT_CONFIG} || "$ENV{GIT_DIR}/config";
50205019
print STDERR <<EOF;
50215020
The following [svn-remote] sections in your config file ($file) are empty
50225021
and can be safely removed:

t/t5400-send-pack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ test_expect_success \
9999
! test -f victim/.git/refs/heads/extra
100100
'
101101

102-
unset GIT_CONFIG GIT_CONFIG_LOCAL
102+
unset GIT_CONFIG
103103
HOME=`pwd`/no-such-directory
104104
export HOME ;# this way we force the victim/.git/config to be used.
105105

t/test-lib.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ PATH=$TEST_DIRECTORY/..:$PATH
471471
GIT_EXEC_PATH=$(pwd)/..
472472
GIT_TEMPLATE_DIR=$(pwd)/../templates/blt
473473
unset GIT_CONFIG
474-
unset GIT_CONFIG_LOCAL
475474
GIT_CONFIG_NOSYSTEM=1
476475
GIT_CONFIG_NOGLOBAL=1
477476
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL

0 commit comments

Comments
 (0)