pretty: --format output should honor logOutputEncoding
[gitweb.git] / t / t3211-peel-ref.sh
index 85f09be9f422e343fb0ee1e8541882448e2e22a7..d4d7792eae845096f8f89ef4d31171d55dac5659 100755 (executable)
@@ -39,4 +39,26 @@ test_expect_success 'refs are peeled outside of refs/tags (packed)' '
        test_cmp expect actual
 '
 
+test_expect_success 'create old-style pack-refs without fully-peeled' '
+       # Git no longer writes without fully-peeled, so we just write our own
+       # from scratch; we could also munge the existing file to remove the
+       # fully-peeled bits, but that seems even more prone to failure,
+       # especially if the format ever changes again. At least this way we
+       # know we are emulating exactly what an older git would have written.
+       {
+               echo "# pack-refs with: peeled " &&
+               print_ref "refs/heads/master" &&
+               print_ref "refs/outside/foo" &&
+               print_ref "refs/tags/base" &&
+               print_ref "refs/tags/foo" &&
+               echo "^$(git rev-parse "refs/tags/foo^{}")"
+       } >tmp &&
+       mv tmp .git/packed-refs
+'
+
+test_expect_success 'refs are peeled outside of refs/tags (old packed)' '
+       git show-ref -d >actual &&
+       test_cmp expect actual
+'
+
 test_done