mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-10 08:22:54 -05:00
t1020: use --git-dir instead of subshell for bare repo
Replace an unnecessarily complex subshell pattern with a much simpler `--git-dir`-based one. The latter is not only simpler, it also no longer relies on implicit bare repo discovery, which would fail with `safe.bareRepository=explicit`. 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
ca053477d9
commit
ecefd7ea3f
@@ -177,10 +177,7 @@ test_expect_success 'no file/rev ambiguity check inside a bare repo (explicit GI
|
||||
test_expect_success 'no file/rev ambiguity check inside a bare repo' '
|
||||
test_when_finished "rm -fr foo.git" &&
|
||||
git clone -s --bare .git foo.git &&
|
||||
(
|
||||
cd foo.git &&
|
||||
git show -s HEAD
|
||||
)
|
||||
git --git-dir=foo.git show -s HEAD
|
||||
'
|
||||
|
||||
test_expect_success SYMLINKS 'detection should not be fooled by a symlink' '
|
||||
|
||||
Reference in New Issue
Block a user