(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'test index-pack handling of delta cycles in packfiles'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ VSub_Name '$TEST_DIRECTORY')) (/lib-pack.sh)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:A) op: Equal rhs: {(01d7713666f4de822776c7622c10f1b07de280dc)} spids: [24] ) ] spids: [24] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:B) op: Equal rhs: {(e68fe8129b546b101aee9510c5328e7f21ca1d18)} spids: [27] ) ] spids: [27] ) (C {(test_expect_success)} {(SQ <'index-pack works with a single delta (A->B)'>)} { (SQ <'\n'> <'\tclear_packs &&\n'> <'\t{\n'> <'\t\tpack_header 2 &&\n'> <'\t\tpack_obj $A $B &&\n'> <'\t\tpack_obj $B\n'> <'\t} >ab.pack &&\n'> <'\tpack_trailer ab.pack &&\n'> <'\tgit index-pack --stdin <ab.pack &&\n'> <'\tgit cat-file -t $A &&\n'> <'\tgit cat-file -t $B\n'> ) } ) (C {(test_expect_success)} {(SQ <'index-pack works with a single delta (B->A)'>)} { (SQ <'\n'> <'\tclear_packs &&\n'> <'\t{\n'> <'\t\tpack_header 2 &&\n'> <'\t\tpack_obj $A &&\n'> <'\t\tpack_obj $B $A\n'> <'\t} >ba.pack &&\n'> <'\tpack_trailer ba.pack &&\n'> <'\tgit index-pack --stdin <ba.pack &&\n'> <'\tgit cat-file -t $A &&\n'> <'\tgit cat-file -t $B\n'> ) } ) (C {(test_expect_success)} {(SQ <'index-pack detects missing base objects'>)} { (SQ <'\n'> <'\tclear_packs &&\n'> <'\t{\n'> <'\t\tpack_header 1 &&\n'> <'\t\tpack_obj $A $B\n'> <'\t} >missing.pack &&\n'> <'\tpack_trailer missing.pack &&\n'> <'\ttest_must_fail git index-pack --fix-thin --stdin <missing.pack\n'> ) } ) (C {(test_expect_success)} {(SQ <'index-pack detects REF_DELTA cycles'>)} { (SQ <'\n'> <'\tclear_packs &&\n'> <'\t{\n'> <'\t\tpack_header 2 &&\n'> <'\t\tpack_obj $A $B &&\n'> <'\t\tpack_obj $B $A\n'> <'\t} >cycle.pack &&\n'> <'\tpack_trailer cycle.pack &&\n'> <'\ttest_must_fail git index-pack --fix-thin --stdin <cycle.pack\n'> ) } ) (C {(test_expect_failure)} {(SQ <'failover to an object in another pack'>)} { (SQ <'\n'> <'\tclear_packs &&\n'> <'\tgit index-pack --stdin <ab.pack &&\n'> <'\tgit index-pack --stdin --fix-thin <cycle.pack\n'> ) } ) (C {(test_expect_failure)} {(SQ <'failover to a duplicate object in the same pack'>)} { (SQ <'\n'> <'\tclear_packs &&\n'> <'\t{\n'> <'\t\tpack_header 3 &&\n'> <'\t\tpack_obj $A $B &&\n'> <'\t\tpack_obj $B $A &&\n'> <'\t\tpack_obj $A\n'> <'\t} >recoverable.pack &&\n'> <'\tpack_trailer recoverable.pack &&\n'> <'\tgit index-pack --fix-thin --stdin <recoverable.pack\n'> ) } ) (C {(test_done)}) ] )