git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Don't use GIT_CONFIG in t5505-remote
@ 2008-02-26 22:15 Daniel Barkalow
  2008-02-26 22:19 ` Jeff King
  2008-02-27  8:21 ` Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Barkalow @ 2008-02-26 22:15 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

For some reason, t5505-remote was setting GIT_CONFIG to .git/config
and exporting it. The sole effect of this was to cause the tests to
fail if "git clone" obeyed it (which it presumably should).

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
---
Maybe test-lib used to set GIT_CONFIG to something that would interfere? 
Or the default behavior was wrong?

 t/t5505-remote.sh |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 636aec2..4fc62f5 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -4,9 +4,6 @@ test_description='git remote porcelain-ish'
 
 . ./test-lib.sh
 
-GIT_CONFIG=.git/config
-export GIT_CONFIG
-
 setup_repository () {
 	mkdir "$1" && (
 	cd "$1" &&
-- 
1.5.4.3.328.gcaed

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

* Re: [PATCH] Don't use GIT_CONFIG in t5505-remote
  2008-02-26 22:15 [PATCH] Don't use GIT_CONFIG in t5505-remote Daniel Barkalow
@ 2008-02-26 22:19 ` Jeff King
  2008-02-27  8:16   ` Junio C Hamano
  2008-02-27  8:21 ` Junio C Hamano
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff King @ 2008-02-26 22:19 UTC (permalink / raw)
  To: Daniel Barkalow; +Cc: Junio C Hamano, git

On Tue, Feb 26, 2008 at 05:15:31PM -0500, Daniel Barkalow wrote:

> For some reason, t5505-remote was setting GIT_CONFIG to .git/config
> and exporting it. The sole effect of this was to cause the tests to
> fail if "git clone" obeyed it (which it presumably should).
> 
> Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
> ---
> Maybe test-lib used to set GIT_CONFIG to something that would interfere? 
> Or the default behavior was wrong?

test-lib used to set it to ".git/config" until recently, so this would
have been a no-op. As to why it was ever in here, I have no idea.

-Peff

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

* Re: [PATCH] Don't use GIT_CONFIG in t5505-remote
  2008-02-26 22:19 ` Jeff King
@ 2008-02-27  8:16   ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2008-02-27  8:16 UTC (permalink / raw)
  To: Jeff King; +Cc: Daniel Barkalow, git

Jeff King <peff@peff.net> writes:

> On Tue, Feb 26, 2008 at 05:15:31PM -0500, Daniel Barkalow wrote:
>
>> For some reason, t5505-remote was setting GIT_CONFIG to .git/config
>> and exporting it. The sole effect of this was to cause the tests to
>> fail if "git clone" obeyed it (which it presumably should).
>> 
>> Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
>> ---
>> Maybe test-lib used to set GIT_CONFIG to something that would interfere? 
>> Or the default behavior was wrong?
>
> test-lib used to set it to ".git/config" until recently, so this would
> have been a no-op. As to why it was ever in here, I have no idea.

Right.

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

* Re: [PATCH] Don't use GIT_CONFIG in t5505-remote
  2008-02-26 22:15 [PATCH] Don't use GIT_CONFIG in t5505-remote Daniel Barkalow
  2008-02-26 22:19 ` Jeff King
@ 2008-02-27  8:21 ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2008-02-27  8:21 UTC (permalink / raw)
  To: Daniel Barkalow; +Cc: git

Daniel Barkalow <barkalow@iabervon.org> writes:

> For some reason, t5505-remote was setting GIT_CONFIG to .git/config
> and exporting it. The sole effect of this was to cause the tests to
> fail if "git clone" obeyed it (which it presumably should).

Your patch is correct, as it was a no-op to set and export
GIT_CONFIG to .git/config there as Jeff pointed out.

But I think git-clone should explicitly ignore user-supplied
GIT_CONFIG in the environment if exists, when it wants to update
the configuration file for the new repository it created, as I
mentioned in the other message.

And I think scripted version has the same issue.  It would
update random places GIT_CONFIG points at, when it wants to
modify the configuration file for the new repository it just
built, which would be a bug.

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

end of thread, other threads:[~2008-02-27  8:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-26 22:15 [PATCH] Don't use GIT_CONFIG in t5505-remote Daniel Barkalow
2008-02-26 22:19 ` Jeff King
2008-02-27  8:16   ` Junio C Hamano
2008-02-27  8:21 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).