X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft0000-basic.sh;h=4e49d590651363631a1f3a795d3c1679a70fb05f;hb=f539d0d6c1f0b4431c0711e290d1f5a7205ed6e6;hp=4bba9c0717731bfc6912ac28f98c10aa0f3e17fd;hpb=5c054a985a5b7e758f48353ac03582c9b2a9f919;p=git.git diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh index 4bba9c071..4e49d5906 100755 --- a/t/t0000-basic.sh +++ b/t/t0000-basic.sh @@ -281,4 +281,20 @@ test_expect_success 'update-index D/F conflict' ' test $numpath0 = 1 ' +test_expect_success 'absolute path works as expected' ' + mkdir first && + ln -s ../.git first/.git && + mkdir second && + ln -s ../first second/other && + mkdir third && + dir="$(cd .git; pwd -P)" && + dir2=third/../second/other/.git && + test "$dir" = "$(test-absolute-path $dir2)" && + file="$dir"/index && + test "$file" = "$(test-absolute-path $dir2/index)" && + ln -s ../first/file .git/syml && + sym="$(cd first; pwd -P)"/file && + test "$sym" = "$(test-absolute-path $dir2/syml)" +' + test_done