apply: do not read from beyond a symbolic link
[gitweb.git] / t / t5510-fetch.sh
index 1f0f8e6827773b1bb9a419a822de2d1ebde8e37a..07986d94bdf2cebfc39ee25c990485f43cbf2999 100755 (executable)
@@ -594,4 +594,15 @@ test_expect_success 'all boundary commits are excluded' '
        test_bundle_object_count .git/objects/pack/pack-${pack##pack    }.pack 3
 '
 
+test_expect_success 'fetching a one-level ref works' '
+       test_commit extra &&
+       git reset --hard HEAD^ &&
+       git update-ref refs/foo extra &&
+       git init one-level &&
+       (
+               cd one-level &&
+               git fetch .. HEAD refs/foo
+       )
+'
+
 test_done