From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ingo Brückl" <ib@wupperonline.de>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] Fix wrong failures in config test
Date: Mon, 10 Jan 2011 15:59:33 -0600 [thread overview]
Message-ID: <20110110215933.GB12030@burratino> (raw)
In-Reply-To: <4d2b7b68.47102a21.bm000@wupperonline.de>
Ingo Brückl wrote:
> It's a function (available in login shells and thus during the test suite):
The test suite doesn't run in a login shell. As I hinted before, you can
put
case "$-" in
*i*) # interactive shell
;;
*)
return 0
esac
in your .bashrc before the function definition and all should be well.
> From what I've learned from you now, if 'git' is an exported bash function,
> 'VAR=val git' will always automatically result in VAR being exported
I didn't understand at first why this particular vintage of bash makes
VAR leak into the current environment. I tried to reproduce it with
Debian bash 3.2-4 (which is based on bash 3.2.39(1)-release) with no
success.
In any event git avoids
VAR=val fn
when fn is a function for this and possibly other reasons (see [1]).
I do not think git ought to guard against a git function (or alias) in
the user's environment, even though doing so might lead to a better
user experience and less confusion on the mailing list. git does not
protect against 'rm' being an alias to 'rm -i' or 'svn' being an
alias, either.
Regards,
Jonathan
[1] http://thread.gmane.org/gmane.comp.version-control.git/135766/focus=137095
prev parent reply other threads:[~2011-01-10 21:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 16:13 [PATCH] Fix wrong failures in config test Ingo Brückl
2011-01-10 16:52 ` Jonathan Nieder
2011-01-10 17:15 ` Ingo Brückl
2011-01-10 17:29 ` Jonathan Nieder
2011-01-10 18:30 ` Junio C Hamano
2011-01-10 19:21 ` Ingo Brückl
2011-01-10 19:42 ` Jonathan Nieder
2011-01-10 21:30 ` Junio C Hamano
2011-01-10 21:33 ` Jonathan Nieder
2011-01-10 21:50 ` Ingo Brückl
[not found] ` <4d2b7b68.47102a21.bm000@wupperonline.de>
2011-01-10 21:59 ` Jonathan Nieder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110110215933.GB12030@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ib@wupperonline.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).