summaryrefslogtreecommitdiff
path: root/t/t1020-subdirectory.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-01-20 02:09:34 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-21 03:10:26 (GMT)
commit68025633e352264898de44ec4856552d9a3abece (patch)
tree4bd49df8df371710a6709a1dbb582d54a38f38fb /t/t1020-subdirectory.sh
parent06f6228a90c50618f0a9793c9e9695be15f93ae2 (diff)
downloadgit-68025633e352264898de44ec4856552d9a3abece.zip
git-68025633e352264898de44ec4856552d9a3abece.tar.gz
git-68025633e352264898de44ec4856552d9a3abece.tar.bz2
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>
Diffstat (limited to 't/t1020-subdirectory.sh')
-rwxr-xr-xt/t1020-subdirectory.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index 4409b87..c090c96 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 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