summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-03-02 07:40:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-03-02 09:58:31 (GMT)
commite371a4c648e72673fcfdf0b45192857dd149e2f5 (patch)
tree3c2e809b09ef02641e13880fc4491614f7c35275 /t
parent2b459b483cb264d3e9a39cd7857da2ccab08179f (diff)
downloadgit-e371a4c648e72673fcfdf0b45192857dd149e2f5.zip
git-e371a4c648e72673fcfdf0b45192857dd149e2f5.tar.gz
git-e371a4c648e72673fcfdf0b45192857dd149e2f5.tar.bz2
Fix make_absolute_path() for parameters without a slash
When passing "xyz" to make_absolute_path(), make_absolute_path() erroneously tried to chdir("xyz"), and then append "/xyz". Instead, skip the chdir() completely when no slash was found. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0000-basic.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 92de088..27b54cb 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -304,6 +304,8 @@ test_expect_success 'absolute path works as expected' '
test "$dir" = "$(test-absolute-path $dir2)" &&
file="$dir"/index &&
test "$file" = "$(test-absolute-path $dir2/index)" &&
+ basename=blub &&
+ test "$dir/$basename" = $(cd .git && test-absolute-path $basename) &&
ln -s ../first/file .git/syml &&
sym="$(cd first; pwd -P)"/file &&
test "$sym" = "$(test-absolute-path $dir2/syml)"