mirror of
https://github.com/git/git.git
synced 2026-04-10 17:00:09 +02:00
Do not verify filenames in a bare repository
For example, it makes no sense to check the presence of a file named "HEAD" when calling "git log HEAD" in a bare repository. Noticed by Han-Wen Nienhuys. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
This commit is contained in:
committed by
Junio C Hamano
parent
06f6228a90
commit
68025633e3
@@ -106,4 +106,33 @@ test_expect_success 'read-tree' '
|
||||
cmp ../one ../original.one
|
||||
'
|
||||
|
||||
test_expect_success 'no file/rev ambuguity check inside .git' '
|
||||
cd $HERE &&
|
||||
git commit -a -m 1 &&
|
||||
cd $HERE/.git &&
|
||||
git show -s HEAD
|
||||
'
|
||||
|
||||
test_expect_success 'no file/rev ambuguity check inside a bare repo' '
|
||||
cd $HERE &&
|
||||
git clone -s --bare .git foo.git &&
|
||||
cd foo.git && GIT_DIR=. git show -s HEAD
|
||||
'
|
||||
|
||||
# This still does not work as it should...
|
||||
: test_expect_success 'no file/rev ambuguity check inside a bare repo' '
|
||||
cd $HERE &&
|
||||
git clone -s --bare .git foo.git &&
|
||||
cd foo.git && git show -s HEAD
|
||||
'
|
||||
|
||||
test_expect_success 'detection should not be fooled by a symlink' '
|
||||
cd $HERE &&
|
||||
rm -fr foo.git &&
|
||||
git clone -s .git another &&
|
||||
ln -s another yetanother &&
|
||||
cd yetanother/.git &&
|
||||
git show -s HEAD
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user