All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Get rid of the last remnants of GIT_CONFIG_LOCAL
@ 2008-12-14 22:10 Johannes Schindelin
  2008-12-14 22:12 ` [PATCH] git-gui: " Johannes Schindelin
  2008-12-15  0:43 ` [PATCH] " Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Schindelin @ 2008-12-14 22:10 UTC (permalink / raw)
  To: git, gitster


In dc871831(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 <johannes.schindelin@gmx.de>
---
 config.c             |    5 +----
 git-svn.perl         |    3 +--
 t/t5400-send-pack.sh |    2 +-
 t/test-lib.sh        |    1 -
 4 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/config.c b/config.c
index 8bd6106..8ff2b4b 100644
--- a/config.c
+++ b/config.c
@@ -640,10 +640,7 @@ int git_config(config_fn_t fn, void *data)
 	char *repo_config = NULL;
 	const char *home = NULL;
 
-	/* $GIT_CONFIG makes git read _only_ the given config file,
-	 * $GIT_CONFIG_LOCAL will make it process it in addition to the
-	 * global config file, the same way it would the per-repository
-	 * config file otherwise. */
+	/* Setting $GIT_CONFIG makes git read _only_ the given config file. */
 	if (config_exclusive_filename)
 		return git_config_from_file(fn, config_exclusive_filename, data);
 	if (git_config_system() && !access(git_etc_gitconfig(), R_OK))
diff --git a/git-svn.perl b/git-svn.perl
index 914c707..efda5c1 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -5007,8 +5007,7 @@ sub minimize_connections {
 		}
 	}
 	if (@emptied) {
-		my $file = $ENV{GIT_CONFIG} || $ENV{GIT_CONFIG_LOCAL} ||
-		           "$ENV{GIT_DIR}/config";
+		my $file = $ENV{GIT_CONFIG} || "$ENV{GIT_DIR}/config";
 		print STDERR <<EOF;
 The following [svn-remote] sections in your config file ($file) are empty
 and can be safely removed:
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index da69f08..b21317d 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -99,7 +99,7 @@ test_expect_success \
 	! test -f victim/.git/refs/heads/extra
 '
 
-unset GIT_CONFIG GIT_CONFIG_LOCAL
+unset GIT_CONFIG
 HOME=`pwd`/no-such-directory
 export HOME ;# this way we force the victim/.git/config to be used.
 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 8936173..22ed448 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -471,7 +471,6 @@ PATH=$TEST_DIRECTORY/..:$PATH
 GIT_EXEC_PATH=$(pwd)/..
 GIT_TEMPLATE_DIR=$(pwd)/../templates/blt
 unset GIT_CONFIG
-unset GIT_CONFIG_LOCAL
 GIT_CONFIG_NOSYSTEM=1
 GIT_CONFIG_NOGLOBAL=1
 export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL
-- 
1.6.0.4.1189.g8876f

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] git-gui: Get rid of the last remnants of GIT_CONFIG_LOCAL
  2008-12-14 22:10 [PATCH] Get rid of the last remnants of GIT_CONFIG_LOCAL Johannes Schindelin
@ 2008-12-14 22:12 ` Johannes Schindelin
  2008-12-17 15:53   ` Shawn O. Pearce
  2008-12-15  0:43 ` [PATCH] " Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2008-12-14 22:12 UTC (permalink / raw)
  To: git, spearce


In dc871831(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 <johannes.schindelin@gmx.de>
---

	You might want to hold off on that, as git-gui is supposed to be 
	less tightly coupled to git.git than, say, git-svn.

	The commit removing support for GIT_CONFIG_LOCAL is from Mon Jun 
	30 03:37:47 2008 -0400...

 git-gui.sh |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/git-gui.sh b/git-gui.sh
index 8a4b42d..bab66bd 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -3315,7 +3315,6 @@ by %s:
 		{^GIT_PAGER$} -
 		{^GIT_TRACE$} -
 		{^GIT_CONFIG$} -
-		{^GIT_CONFIG_LOCAL$} -
 		{^GIT_(AUTHOR|COMMITTER)_DATE$} {
 			append msg " - $name\n"
 			incr ignored_env
-- 
1.6.0.4.1189.g8876f

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Get rid of the last remnants of GIT_CONFIG_LOCAL
  2008-12-14 22:10 [PATCH] Get rid of the last remnants of GIT_CONFIG_LOCAL Johannes Schindelin
  2008-12-14 22:12 ` [PATCH] git-gui: " Johannes Schindelin
@ 2008-12-15  0:43 ` Junio C Hamano
  2008-12-15  9:35   ` Johannes Schindelin
  1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2008-12-15  0:43 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Get rid of the last remnants of GIT_CONFIG_LOCAL
  2008-12-15  0:43 ` [PATCH] " Junio C Hamano
@ 2008-12-15  9:35   ` Johannes Schindelin
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2008-12-15  9:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Hi,

On Sun, 14 Dec 2008, Junio C Hamano wrote:

> Thanks.

Heh, am I that rare a contributor now that you start to thank me for my 
patches? ;-)

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] git-gui: Get rid of the last remnants of GIT_CONFIG_LOCAL
  2008-12-14 22:12 ` [PATCH] git-gui: " Johannes Schindelin
@ 2008-12-17 15:53   ` Shawn O. Pearce
  0 siblings, 0 replies; 5+ messages in thread
From: Shawn O. Pearce @ 2008-12-17 15:53 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> 
> In dc871831(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.
> 
> 	You might want to hold off on that, as git-gui is supposed to be 
> 	less tightly coupled to git.git than, say, git-svn.
> 
> 	The commit removing support for GIT_CONFIG_LOCAL is from Mon Jun 
> 	30 03:37:47 2008 -0400...

Nah, that's in Git 1.6.0.  This block of code is only useful on
Windows, where most people are probably running a more msysgit
style system than some random mashup of Git and git-gui versions.

Plus, wasn't there just some discussion about how this warning
is perhaps harmful to the user because it doesn't really help
her to resolve the problem?

I applied it anyway.  Its quite unlikely anyone runs git-gui on
Windows with GIT_CONFIG_LOCAL in their environment.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-12-17 15:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-14 22:10 [PATCH] Get rid of the last remnants of GIT_CONFIG_LOCAL Johannes Schindelin
2008-12-14 22:12 ` [PATCH] git-gui: " Johannes Schindelin
2008-12-17 15:53   ` Shawn O. Pearce
2008-12-15  0:43 ` [PATCH] " Junio C Hamano
2008-12-15  9:35   ` Johannes Schindelin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.