Skip to content

allow customizing /etc/gitconfig location with an environment

Junio C Hamano git 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 0 repliesNew
  2. v14 patches 56 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9config: allow customizing /etc/gitconfig location with an environmentcache.h config.c t/gitconfig-for-test +2 more+26 -20 replies
2/9t1300: always compare expect to actualt/t1300-repo-config.sh+1 -10 replies
3/9t1308: ignore system-wide config in the iteration testt/t1308-config-set.sh+1 -00 replies
4/9t1300: check also system-wide configuration file in --show-origin testst/t1300-repo-config.sh+14 -10 replies
5/9t1300: disable system-wide config for tests that wants to read from -ct/t1300-repo-config.sh+1 -00 replies
6/9t1300: take contents of system-wide configuration into account in "--list" testt/t1300-repo-config.sh+4 -30 replies
7/9t1300: be explicit in local configuration testst/t1300-repo-config.sh+40 -400 replies
8/9worktree: honor configuration variablesbuiltin/worktree.c+2 -00 replies
9/9core.abbrev: raise the default abbreviation to 12 hexdigitsenvironment.c t/gitconfig-for-test+4 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/9] allow customizing /etc/gitconfig location with an environment

This ended up growing quite a bit, and I mostly hate it.

- Patch 1 introduces GIT_CONFIG_SYSTEM_PATH environment variable that lets you point at a file other than /etc/gitconfig to pretend that your file is the system-wide configuration.

- Patch 2 is a small bugfix.

- Patches 3-7 are updates to 1300 and 1308, i.e. tests for "git config", to make them more robust, in preparation for using GIT_CONFIG_SYSTEM_PATH mechanism to point at a file during the test. It protects them a bit more than necessary in that the variables some of the tests they use when they try to see the output from "git config --get" are unlikely to appear in the fake system-wide configuration during the test (hence disabling the fake system-wide configuration has no practical effect), but nevertheless the calls are protected by explicitly telling them to read only from --local configuration file to future-proof them.

- Patch 8 is queued elsewhere already.

- Patch 9 raises the default core.abbrev to 12 and countermands it by setting it to 7 in a fake system-wide configuration file during our test. The unconditional widening of the default abbreviation size in this patch will have to be discarded, preferring the approach Linus is taking to auto-size it based on the number of objects in the repository, but the part that updates the test script may still be necessary.

Jeff King (1):
t1300: check also system-wide configuration file in --show-origin
tests

Junio C Hamano (8):
config: allow customizing /etc/gitconfig location with an environment
t1300: always compare expect to actual
t1308: ignore system-wide config in the iteration test
t1300: disable system-wide config for tests that wants to read from -c
t1300: take contents of system-wide configuration into account in

    "--list" test

t1300: be explicit in local configuration tests
worktree: honor configuration variables core.abbrev: raise the default abbreviation to 12 hexdigits

 builtin/worktree.c     |   2 +
 cache.h                |   1 +
 config.c               |   2 +
 environment.c          |   2 +-
 t/gitconfig-for-test   |   9 ++++
 t/t1300-repo-config.sh | 120 ++++++++++++++++++++++++++++++-------------------
 t/t1308-config-set.sh  |   1 +
 t/test-lib.sh          |   4 +-
 8 files changed, 93 insertions(+), 48 deletions(-)
 create mode 100644 t/gitconfig-for-test
Signature · 1 line
2.10.0-589-g5adf4e1