mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-10 08:22:54 -05:00
t0001: replace cd+git with git --git-dir in check_config
To prepare for `safe.bareRepository` defaulting to `explicit`
(see 8d1a744820), replace `cd <dir> && git config` with `git
--git-dir=<dir> config` so the helper does not rely on implicit bare
repository discovery.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d21652903c
commit
f1a852920a
@@ -20,8 +20,8 @@ check_config () {
|
||||
return 1
|
||||
fi
|
||||
|
||||
bare=$(cd "$1" && git config --bool core.bare)
|
||||
worktree=$(cd "$1" && git config core.worktree) ||
|
||||
bare=$(git --git-dir="$1" config --bool core.bare)
|
||||
worktree=$(git --git-dir="$1" config core.worktree) ||
|
||||
worktree=unset
|
||||
|
||||
test "$bare" = "$2" && test "$worktree" = "$3" || {
|
||||
|
||||
Reference in New Issue
Block a user