t: prefer "git config --file" to GIT_CONFIG
commitf7e87141011fc55f8267ea76d3cc016ee87f9053
authorJeff King <peff@peff.net>
Thu, 20 Mar 2014 23:17:01 +0000 (20 19:17 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Mar 2014 21:26:55 +0000 (21 14:26 -0700)
treee6127793ab08403ad771f7e7e58a775f2f434d55
parent551a3e60d1cb9dca37a3a789cf1a4b94074ce6c5
t: prefer "git config --file" to GIT_CONFIG

Doing:

  GIT_CONFIG=foo git config ...

is equivalent to:

  git config --file=foo ...

The latter is easier to read and slightly less error-prone,
because of issues with one-shot variables and shell
functions (e.g., you cannot use the former with
test_must_fail).

Note that we explicitly leave one case in t1300 which checks
the same operation on both GIT_CONFIG and "git config
--file". They are equivalent in the code these days, but
this will make sure it remains so.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1300-repo-config.sh
t/t1302-repo-version.sh
t/t7400-submodule-basic.sh
t/t9130-git-svn-authors-file.sh
t/t9154-git-svn-fancy-glob.sh