completion: wrap __git_refs() for better option parsing
[gitweb.git] / t / t5309-pack-delta-cycles.sh
index 1640bf776421fecf6fa2e43677349a6389586213..3e7861b075ffa54f0214aaa349df33be7a113d35 100755 (executable)
@@ -56,4 +56,22 @@ test_expect_success 'index-pack detects REF_DELTA cycles' '
        test_must_fail git index-pack --fix-thin --stdin <cycle.pack
 '
 
+test_expect_failure 'failover to an object in another pack' '
+       clear_packs &&
+       git index-pack --stdin <ab.pack &&
+       git index-pack --stdin --fix-thin <cycle.pack
+'
+
+test_expect_failure 'failover to a duplicate object in the same pack' '
+       clear_packs &&
+       {
+               pack_header 3 &&
+               pack_obj $A $B &&
+               pack_obj $B $A &&
+               pack_obj $A
+       } >recoverable.pack &&
+       pack_trailer recoverable.pack &&
+       git index-pack --fix-thin --stdin <recoverable.pack
+'
+
 test_done