log: decorate HEAD with branch name
[gitweb.git] / t / t2004-checkout-cache-temp.sh
index 22d1a248b65ad7ce4d1a2d51e4b88169d533d98b..a12afe93f32948dd994d55418ed93485757d2ba8 100755 (executable)
@@ -197,13 +197,25 @@ test_expect_success 'checkout --temp within subdir' '
 
 test_expect_success 'checkout --temp symlink' '
        rm -f path* .merge_* actual .git/index &&
-       test_ln_s_add b a &&
+       test_ln_s_add path7 path6 &&
        git checkout-index --temp -a >actual &&
        test_line_count = 1 actual &&
-       test $(cut "-d  " -f2 actual) = a &&
+       test $(cut "-d  " -f2 actual) = path6 &&
        p=$(cut "-d     " -f1 actual) &&
        test -f $p &&
-       test $(cat $p) = b
+       test $(cat $p) = path7
+'
+
+test_expect_success 'emit well-formed relative path' '
+       rm -f path* .merge_* actual .git/index &&
+       >path0123456789 &&
+       git update-index --add path0123456789 &&
+       (
+               cd asubdir &&
+               git checkout-index --temp -- ../path0123456789 >actual &&
+               test_line_count = 1 actual &&
+               test $(cut "-d  " -f2 actual) = ../path0123456789
+       )
 '
 
 test_done