Skip to content

Commit

Permalink
Merge branch 'th/t9903-symlinked-workdir'
Browse files Browse the repository at this point in the history
* th/t9903-symlinked-workdir:
  t9903: Don't fail when run from path accessed through symlink
  • Loading branch information
Junio C Hamano committed Apr 18, 2013
2 parents e7e656c + 3ba40b4 commit da89885
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions t/t9903-bash-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test_expect_success 'gitdir - .git directory in cwd' '
'

test_expect_success 'gitdir - .git directory in parent' '
echo "$TRASH_DIRECTORY/.git" > expected &&
echo "$(pwd -P)/.git" > expected &&
(
cd subdir/subsubdir &&
__gitdir > "$actual"
Expand All @@ -77,7 +77,7 @@ test_expect_success 'gitdir - cwd is a .git directory' '
'

test_expect_success 'gitdir - parent is a .git directory' '
echo "$TRASH_DIRECTORY/.git" > expected &&
echo "$(pwd -P)/.git" > expected &&
(
cd .git/refs/heads &&
__gitdir > "$actual"
Expand Down Expand Up @@ -115,7 +115,7 @@ test_expect_success 'gitdir - non-existing $GIT_DIR' '
'

test_expect_success 'gitdir - gitfile in cwd' '
echo "$TRASH_DIRECTORY/otherrepo/.git" > expected &&
echo "$(pwd -P)/otherrepo/.git" > expected &&
echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" > subdir/.git &&
test_when_finished "rm -f subdir/.git" &&
(
Expand All @@ -126,7 +126,7 @@ test_expect_success 'gitdir - gitfile in cwd' '
'

test_expect_success 'gitdir - gitfile in parent' '
echo "$TRASH_DIRECTORY/otherrepo/.git" > expected &&
echo "$(pwd -P)/otherrepo/.git" > expected &&
echo "gitdir: $TRASH_DIRECTORY/otherrepo/.git" > subdir/.git &&
test_when_finished "rm -f subdir/.git" &&
(
Expand All @@ -137,7 +137,7 @@ test_expect_success 'gitdir - gitfile in parent' '
'

test_expect_success SYMLINKS 'gitdir - resulting path avoids symlinks' '
echo "$TRASH_DIRECTORY/otherrepo/.git" > expected &&
echo "$(pwd -P)/otherrepo/.git" > expected &&
mkdir otherrepo/dir &&
test_when_finished "rm -rf otherrepo/dir" &&
ln -s otherrepo/dir link &&
Expand Down

0 comments on commit da89885

Please sign in to comment.