Re: [PATCH v2] tests: set temp variables using 'env' in test function instead of subshell

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

 



On Tue, Mar 18, 2014 at 03:16:27PM -0700, Junio C Hamano wrote:

> > Isn't GIT_CONFIG here another way of saying:
> >
> >   test_must_fail git config -f doesnotexist --list
> >
> > Perhaps that is shorter and more readable still (and there are a few
> > similar cases in this patch.
> 
> Surely, but are we assuming that "git config" correctly honors the
> equivalence between GIT_CONFIG=file and -f file, or is that also
> something we are testing in these tests?

I think we can assume that they are equivalent, and it is not worth
testing (and they are equivalent in code since 270a344 (config: stop
using config_exclusive_filename, 2012-02-16).

My recollection is that GIT_CONFIG mostly exists as a historical
footnote. Recall that at one time it affected all commands, but that had
many problems and was done away with in dc87183 (Only use GIT_CONFIG in
"git config", not other programs, 2008-06-30). I think we left it in
place for git-config mostly for backward compatibility, but I didn't see
that point explicitly addressed in the list discussion (the main issue
was that setting it for things besides "git config" is a bad idea, as it
suppresses ~/.gitconfig).

-Peff
--
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]