X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft1020-subdirectory.sh;h=1e8f9e59dfe7e63177dea0a2e4b5c018a4756994;hb=8aaf7d6410119ee221f5d3ebdc4fc5a57f862665;hp=4409b87f8d9bf151883c1888ddc64c63b24d85c9;hpb=0f2ca9d5c99436d048bfe0a7161b4365a731938f;p=git.git diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh index 4409b87f8..1e8f9e59d 100755 --- a/t/t1020-subdirectory.sh +++ b/t/t1020-subdirectory.sh @@ -106,4 +106,33 @@ test_expect_success 'read-tree' ' cmp ../one ../original.one ' +test_expect_success 'no file/rev ambiguity check inside .git' ' + cd $HERE && + git commit -a -m 1 && + cd $HERE/.git && + git show -s HEAD +' + +test_expect_success 'no file/rev ambiguity 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 ambiguity 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