summaryrefslogtreecommitdiff
path: root/t/t1501-worktree.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-22 00:51:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-22 00:51:25 (GMT)
commit0aac1614e976164259edf5f950da4cbebe069466 (patch)
tree50f0dd772ab75c2086458b51b421bde6863574ed /t/t1501-worktree.sh
parent07adc43f3a17a34111e17eadef3f6f4eef3eb67a (diff)
parent72183cb297f614dc2df1c0ed08afac1be27ec35a (diff)
downloadgit-0aac1614e976164259edf5f950da4cbebe069466.zip
git-0aac1614e976164259edf5f950da4cbebe069466.tar.gz
git-0aac1614e976164259edf5f950da4cbebe069466.tar.bz2
Merge branch 'sg/maint-gitdir-in-subdir'
* sg/maint-gitdir-in-subdir: Fix gitdir detection when in subdir of gitdir
Diffstat (limited to 't/t1501-worktree.sh')
-rwxr-xr-xt/t1501-worktree.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index f6a6f83..27dc6c5 100755
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
@@ -92,6 +92,13 @@ cd sub/dir || exit 1
test_rev_parse 'in repo.git/sub/dir' false true true sub/dir/
cd ../../../.. || exit 1
+test_expect_success 'detecting gitdir when cwd is in a subdir of gitdir' '
+ (expected=$(pwd)/repo.git &&
+ cd repo.git/refs &&
+ unset GIT_DIR &&
+ test "$expected" = "$(git rev-parse --git-dir)")
+'
+
test_expect_success 'repo finds its work tree' '
(cd repo.git &&
: > work/sub/dir/untracked &&