Re: [PATCH] Fix wrong failures in config test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]