(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: 
            {
              (SQ 
                (Token
                  id: Id.Lit_Chars
                  val: 'pack index with 64-bit offsets and object CRC'
                  span_id: 15
                )
              )
            }
          spids: [13]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:setup span_id:28))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'rm -rf .git &&\n' span_id:34) 
          (Token id:Id.Lit_Chars val:'     git init &&\n' span_id:35) (Token id:Id.Lit_Chars val:'     git config pack.threads 1 &&\n' span_id:36) 
          (Token id:Id.Lit_Chars val:'     i=1 &&\n' span_id:37) (Token id:Id.Lit_Chars val:'     while test $i -le 100\n' span_id:38) 
          (Token id:Id.Lit_Chars val:'     do\n' span_id:39) (Token id:Id.Lit_Chars val:'         iii=$(printf ' span_id:40)
        ) (Id.Lit_Other '%') (03i) 
        (SQ (Token id:Id.Lit_Chars val:' $i)\n' span_id:45) 
          (Token
            id: Id.Lit_Chars
            val: '         test-genrandom "bar" 200 > wide_delta_$iii &&\n'
            span_id: 46
          ) 
          (Token
            id: Id.Lit_Chars
            val: '         test-genrandom "baz $iii" 50 >> wide_delta_$iii &&\n'
            span_id: 47
          ) (Token id:Id.Lit_Chars val:'         test-genrandom "foo"$i 100 > deep_delta_$iii &&\n' span_id:48) 
          (Token
            id: Id.Lit_Chars
            val: '         test-genrandom "foo"$(expr $i + 1) 100 >> deep_delta_$iii &&\n'
            span_id: 49
          ) 
          (Token
            id: Id.Lit_Chars
            val: '         test-genrandom "foo"$(expr $i + 2) 100 >> deep_delta_$iii &&\n'
            span_id: 50
          ) (Token id:Id.Lit_Chars val:'         echo $iii >file_$iii &&\n' span_id:51) 
          (Token
            id: Id.Lit_Chars
            val: '         test-genrandom "$iii" 8192 >>file_$iii &&\n'
            span_id: 52
          ) 
          (Token
            id: Id.Lit_Chars
            val: '         git update-index --add file_$iii deep_delta_$iii wide_delta_$iii &&\n'
            span_id: 53
          ) (Token id:Id.Lit_Chars val:'         i=$(expr $i + 1) || return 1\n' span_id:54) 
          (Token id:Id.Lit_Chars val:'     done &&\n' span_id:55) (Token id:Id.Lit_Chars val:'     { echo 101 && test-genrandom 100 8192; } >file_101 &&\n' span_id:56) 
          (Token
            id: Id.Lit_Chars
            val: '     git update-index --add file_101 &&\n'
            span_id: 57
          ) (Token id:Id.Lit_Chars val:'     tree=$(git write-tree) &&\n' span_id:58) 
          (Token
            id: Id.Lit_Chars
            val: '     commit=$(git commit-tree $tree </dev/null) && {\n'
            span_id: 59
          ) (Token id:Id.Lit_Chars val:'\t echo $tree &&\n' span_id:60) 
          (Token
            id: Id.Lit_Chars
            val: '\t git ls-tree $tree | sed -e "s/.* \\\\([0-9a-f]*\\\\)\t.*/\\\\1/"\n'
            span_id: 61
          ) (Token id:Id.Lit_Chars val:'     } >obj-list &&\n' span_id:62) 
          (Token id:Id.Lit_Chars val:'     git update-ref HEAD $commit' span_id:63)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'pack-objects with index version 1' span_id:72))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'pack1=$(git pack-objects --index-version=1 test-1 <obj-list) &&\n'
            span_id: 78
          ) (Token id:Id.Lit_Chars val:'     git verify-pack -v "test-1-${pack1}.pack"' span_id:79)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'pack-objects with index version 2' span_id:88))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'pack2=$(git pack-objects --index-version=2 test-2 <obj-list) &&\n'
            span_id: 94
          ) (Token id:Id.Lit_Chars val:'     git verify-pack -v "test-2-${pack2}.pack"' span_id:95)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'both packs should be identical' span_id:104))} {(SQ (Token id:Id.Lit_Chars val:'cmp "test-1-${pack1}.pack" "test-2-${pack2}.pack"' span_id:110))}
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'index v1 and index v2 should be different' span_id:119))} {(SQ (Token id:Id.Lit_Chars val:'! cmp "test-1-${pack1}.idx" "test-2-${pack2}.idx"' span_id:125))}
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'index-pack with index version 1' span_id:134))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git index-pack --index-version=1 -o 1.idx "test-1-${pack1}.pack"'
            span_id: 140
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'index-pack with index version 2' span_id:149))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git index-pack --index-version=2 -o 2.idx "test-1-${pack1}.pack"'
            span_id: 155
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'index-pack results should match pack-objects ones'
            span_id: 164
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'cmp "test-1-${pack1}.idx" "1.idx" &&\n' span_id:170) 
          (Token id:Id.Lit_Chars val:'     cmp "test-2-${pack2}.idx" "2.idx"' span_id:171)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'index-pack --verify on index version 1' span_id:178))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:182) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit index-pack --verify "test-1-${pack1}.pack"\n'
            span_id: 183
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'index-pack --verify on index version 2' span_id:190))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:194) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit index-pack --verify "test-2-${pack2}.pack"\n'
            span_id: 195
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'pack-objects --index-version=2, is not accepted' span_id:204))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test_must_fail git pack-objects --index-version=2, test-3 <obj-list'
            span_id: 210
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'index v2: force some 64-bit offsets with pack-objects'
            span_id: 219
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'pack3=$(git pack-objects --index-version=2,0x40000 test-3 <obj-list)'
            span_id: 225
          )
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:msg)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:232)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Simple
                                    words: [
                                      {(git)}
                                      {(verify-pack)}
                                      {(-v)}
                                      {(DQ (test-3-) (${ Id.VSub_Name pack3) (.pack))}
                                    ]
                                    redirects: [
                                      (redir.Redir
                                        op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:247)
                                        fd: 2
                                        arg_word: {(1)}
                                      )
                                    ]
                                  )
                                ]
                              )
                          )
                        }
                      spids: [231]
                    )
                  ]
                )
                (command.Pipeline
                  children: [
                    (command.Subshell
                      command_list: 
                        (command.CommandList
                          children: [
                            (command.Pipeline
                              children: [
                                (C {(echo)} {(DQ ($ Id.VSub_DollarName '$msg'))})
                                (C {(grep)} {(DQ ('pack too large .* off_t'))})
                              ]
                              negated: F
                            )
                          ]
                        )
                    )
                  ]
                  negated: T
                )
              ]
            )
          ]
          action: [(C {(test_set_prereq)} {(OFF64_T)})]
          spids: [229 272]
        )
      ]
      else_action: [(C {(say)} {(DQ ('# skipping tests concerning 64-bit offsets'))})]
    )
    (C {(test_expect_success)} {(OFF64_T)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'index v2: verify a pack with some 64-bit offsets'
            span_id: 298
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:'git verify-pack -v "test-3-${pack3}.pack"' span_id:304))}
    )
    (C {(test_expect_success)} {(OFF64_T)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '64-bit offsets: should be different from previous index v2 results'
            span_id: 315
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:'! cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"' span_id:321))}
    )
    (C {(test_expect_success)} {(OFF64_T)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'index v2: force some 64-bit offsets with index-pack'
            span_id: 332
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"'
            span_id: 338
          )
        )
      }
    )
    (C {(test_expect_success)} {(OFF64_T)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '64-bit offsets: index-pack result should match pack-objects one'
            span_id: 349
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:'cmp "test-3-${pack3}.idx" "3.idx"' span_id:355))}
    )
    (C {(test_expect_success)} {(OFF64_T)} 
      {(SQ (Token id:Id.Lit_Chars val:'index-pack --verify on 64-bit offset v2 (cheat)' span_id:364))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:368) 
          (Token
            id: Id.Lit_Chars
            val: '\t# This cheats by knowing which lower offset should still be encoded\n'
            span_id: 369
          ) (Token id:Id.Lit_Chars val:'\t# in 64-bit representation.\n' span_id:370) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit index-pack --verify --index-version=2,0x40000 "test-3-${pack3}.pack"\n'
            span_id: 371
          )
        )
      }
    )
    (C {(test_expect_success)} {(OFF64_T)} 
      {(SQ (Token id:Id.Lit_Chars val:'index-pack --verify on 64-bit offset v2' span_id:380))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:384) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit index-pack --verify "test-3-${pack3}.pack"\n'
            span_id: 385
          )
        )
      }
    )
    (command.ShFunction
      name: index_obj_nr
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:idx_file)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [399]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:object_sha1)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [403]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:nr)
                  op: assign_op.Equal
                  rhs: {(0)}
                  spids: [407]
                )
              ]
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{(git)} {(show-index)}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Less val:'<' span_id:415)
                      fd: -1
                      arg_word: {($ Id.VSub_DollarName '$idx_file')}
                    )
                  ]
                )
                (command.WhileUntil
                  keyword: (Token id:Id.KW_While val:while span_id:422)
                  cond: [(C {(read)} {(offs)} {(sha1)} {(extra)})]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:nr)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (word_part.ArithSub
                                    anode: 
                                      (arith_expr.Binary
                                        op_id: Id.Arith_Plus
                                        left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$nr')})
                                        right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                      )
                                  )
                                }
                              spids: [436]
                            )
                          ]
                        )
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {(test)} {(DQ ($ Id.VSub_DollarName '$sha1'))} {(Id.Lit_Equals '=')} 
                              {(DQ ($ Id.VSub_DollarName '$object_sha1'))}
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Continue val:continue span_id:461)
                            )
                          ]
                        )
                        (C {(echo)} 
                          {
                            (DQ 
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Minus
                                    left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$nr')})
                                    right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                  )
                              )
                            )
                          }
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Break val:break span_id:478)
                        )
                      ]
                    )
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: index_obj_offset
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:idx_file)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [496]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:object_sha1)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [500]
                )
              ]
            )
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{(git)} {(show-index)}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Less val:'<' span_id:508)
                      fd: -1
                      arg_word: {($ Id.VSub_DollarName '$idx_file')}
                    )
                  ]
                )
                (C {(grep)} {($ Id.VSub_DollarName '$object_sha1')})
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {(read)} {(offs)} {(extra)})
                            (C {(echo)} {(DQ ($ Id.VSub_DollarName '$offs'))})
                          ]
                        )
                      ]
                    )
                )
              ]
              negated: F
            )
          ]
        )
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'[index v1] 1) stream pack to repository' span_id:547))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git index-pack --index-version=1 --stdin < "test-1-${pack1}.pack" &&\n'
            span_id: 553
          ) (Token id:Id.Lit_Chars val:'     git prune-packed &&\n' span_id:554) 
          (Token
            id: Id.Lit_Chars
            val: '     git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&\n'
            span_id: 555
          ) 
          (Token
            id: Id.Lit_Chars
            val: '     cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&\n'
            span_id: 556
          ) 
          (Token
            id: Id.Lit_Chars
            val: '     cmp "test-1-${pack1}.idx"  ".git/objects/pack/pack-${pack1}.idx"'
            span_id: 557
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '[index v1] 2) create a stealth corruption in a delta base reference'
            span_id: 566
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '# This test assumes file_101 is a delta smaller than 16 bytes.\n'
            span_id: 572
          ) 
          (Token
            id: Id.Lit_Chars
            val: '     # It should be against file_100 but we substitute its base for file_099\n'
            span_id: 573
          ) (Token id:Id.Lit_Chars val:'     sha1_101=$(git hash-object file_101) &&\n' span_id:574) 
          (Token
            id: Id.Lit_Chars
            val: '     sha1_099=$(git hash-object file_099) &&\n'
            span_id: 575
          ) (Token id:Id.Lit_Chars val:'     offs_101=$(index_obj_offset 1.idx $sha1_101) &&\n' span_id:576) 
          (Token
            id: Id.Lit_Chars
            val: '     nr_099=$(index_obj_nr 1.idx $sha1_099) &&\n'
            span_id: 577
          ) (Token id:Id.Lit_Chars val:'     chmod +w ".git/objects/pack/pack-${pack1}.pack" &&\n' span_id:578) 
          (Token
            id: Id.Lit_Chars
            val: '     dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($offs_101 + 1)) \\\n'
            span_id: 579
          ) (Token id:Id.Lit_Chars val:'        if=".git/objects/pack/pack-${pack1}.idx" \\\n' span_id:580) 
          (Token
            id: Id.Lit_Chars
            val: '        skip=$((4 + 256 * 4 + $nr_099 * 24)) \\\n'
            span_id: 581
          ) (Token id:Id.Lit_Chars val:'        bs=1 count=20 conv=notrunc &&\n' span_id:582) 
          (Token
            id: Id.Lit_Chars
            val: '     git cat-file blob $sha1_101 > file_101_foo1'
            span_id: 583
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '[index v1] 3) corrupted delta happily returned wrong data'
            span_id: 592
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:'test -f file_101_foo1 && ! cmp file_101 file_101_foo1' span_id:598))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '[index v1] 4) confirm that the pack is actually corrupted'
            span_id: 607
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:'test_must_fail git fsck --full $commit' span_id:613))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '[index v1] 5) pack-objects happily reuses corrupted data'
            span_id: 622
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'pack4=$(git pack-objects test-4 <obj-list) &&\n' span_id:628) 
          (Token id:Id.Lit_Chars val:'     test -f "test-4-${pack4}.pack"' span_id:629)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'[index v1] 6) newly created pack is BAD !' span_id:638))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test_must_fail git verify-pack -v "test-4-${pack4}.pack"'
            span_id: 644
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'[index v2] 1) stream pack to repository' span_id:653))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'rm -f .git/objects/pack/* &&\n' span_id:659) 
          (Token
            id: Id.Lit_Chars
            val: '     git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&\n'
            span_id: 660
          ) (Token id:Id.Lit_Chars val:'     git prune-packed &&\n' span_id:661) 
          (Token
            id: Id.Lit_Chars
            val: '     git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&\n'
            span_id: 662
          ) 
          (Token
            id: Id.Lit_Chars
            val: '     cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&\n'
            span_id: 663
          ) 
          (Token
            id: Id.Lit_Chars
            val: '     cmp "test-2-${pack1}.idx"  ".git/objects/pack/pack-${pack1}.idx"'
            span_id: 664
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '[index v2] 2) create a stealth corruption in a delta base reference'
            span_id: 673
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '# This test assumes file_101 is a delta smaller than 16 bytes.\n'
            span_id: 679
          ) 
          (Token
            id: Id.Lit_Chars
            val: '     # It should be against file_100 but we substitute its base for file_099\n'
            span_id: 680
          ) (Token id:Id.Lit_Chars val:'     sha1_101=$(git hash-object file_101) &&\n' span_id:681) 
          (Token
            id: Id.Lit_Chars
            val: '     sha1_099=$(git hash-object file_099) &&\n'
            span_id: 682
          ) (Token id:Id.Lit_Chars val:'     offs_101=$(index_obj_offset 1.idx $sha1_101) &&\n' span_id:683) 
          (Token
            id: Id.Lit_Chars
            val: '     nr_099=$(index_obj_nr 1.idx $sha1_099) &&\n'
            span_id: 684
          ) (Token id:Id.Lit_Chars val:'     chmod +w ".git/objects/pack/pack-${pack1}.pack" &&\n' span_id:685) 
          (Token
            id: Id.Lit_Chars
            val: '     dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($offs_101 + 1)) \\\n'
            span_id: 686
          ) (Token id:Id.Lit_Chars val:'        if=".git/objects/pack/pack-${pack1}.idx" \\\n' span_id:687) 
          (Token
            id: Id.Lit_Chars
            val: '        skip=$((8 + 256 * 4 + $nr_099 * 20)) \\\n'
            span_id: 688
          ) (Token id:Id.Lit_Chars val:'        bs=1 count=20 conv=notrunc &&\n' span_id:689) 
          (Token
            id: Id.Lit_Chars
            val: '     git cat-file blob $sha1_101 > file_101_foo2'
            span_id: 690
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '[index v2] 3) corrupted delta happily returned wrong data'
            span_id: 699
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:'test -f file_101_foo2 && ! cmp file_101 file_101_foo2' span_id:705))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '[index v2] 4) confirm that the pack is actually corrupted'
            span_id: 714
          )
        )
      } {(SQ (Token id:Id.Lit_Chars val:'test_must_fail git fsck --full $commit' span_id:720))}
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: '[index v2] 5) pack-objects refuses to reuse corrupted data'
            span_id: 729
          )
        )
      } 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test_must_fail git pack-objects test-5 <obj-list &&\n'
            span_id: 735
          ) 
          (Token
            id: Id.Lit_Chars
            val: '     test_must_fail git pack-objects --no-reuse-object test-6 <obj-list'
            span_id: 736
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'[index v2] 6) verify-pack detects CRC mismatch' span_id:745))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'rm -f .git/objects/pack/* &&\n' span_id:751) 
          (Token
            id: Id.Lit_Chars
            val: '     git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&\n'
            span_id: 752
          ) 
          (Token
            id: Id.Lit_Chars
            val: '     git verify-pack ".git/objects/pack/pack-${pack1}.pack" &&\n'
            span_id: 753
          ) (Token id:Id.Lit_Chars val:'     obj=$(git hash-object file_001) &&\n' span_id:754) 
          (Token
            id: Id.Lit_Chars
            val: '     nr=$(index_obj_nr ".git/objects/pack/pack-${pack1}.idx" $obj) &&\n'
            span_id: 755
          ) (Token id:Id.Lit_Chars val:'     chmod +w ".git/objects/pack/pack-${pack1}.idx" &&\n' span_id:756) 
          (Token
            id: Id.Lit_Chars
            val: '     printf xxxx | dd of=".git/objects/pack/pack-${pack1}.idx" conv=notrunc \\\n'
            span_id: 757
          ) 
          (Token
            id: Id.Lit_Chars
            val: 
'        bs=1 count=4 seek=$((8 + 256 * 4 + $(wc -l <obj-list) * 20 + $nr * 4)) &&\n'
            span_id: 758
          ) (Token id:Id.Lit_Chars val:'     ( while read obj\n' span_id:759) 
          (Token
            id: Id.Lit_Chars
            val: '       do git cat-file -p $obj >/dev/null || exit 1\n'
            span_id: 760
          ) (Token id:Id.Lit_Chars val:'       done <obj-list ) &&\n' span_id:761) 
          (Token
            id: Id.Lit_Chars
            val: '     test_must_fail git verify-pack ".git/objects/pack/pack-${pack1}.pack"\n'
            span_id: 762
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'running index-pack in the object store' span_id:769))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:773) 
          (Token id:Id.Lit_Chars val:'    rm -f .git/objects/pack/* &&\n' span_id:774) 
          (Token
            id: Id.Lit_Chars
            val: '    cp test-1-${pack1}.pack .git/objects/pack/pack-${pack1}.pack &&\n'
            span_id: 775
          ) (Token id:Id.Lit_Chars val:'    (\n' span_id:776) 
          (Token id:Id.Lit_Chars val:'\tcd .git/objects/pack\n' span_id:777) (Token id:Id.Lit_Chars val:'\tgit index-pack pack-${pack1}.pack\n' span_id:778) 
          (Token id:Id.Lit_Chars val:'    ) &&\n' span_id:779) (Token id:Id.Lit_Chars val:'    test -f .git/objects/pack/pack-${pack1}.idx\n' span_id:780)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'index-pack --strict warns upon missing tagger in tag'
            span_id: 787
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:791) 
          (Token id:Id.Lit_Chars val:'    sha=$(git rev-parse HEAD) &&\n' span_id:792) (Token id:Id.Lit_Chars val:'    cat >wrong-tag <<EOF &&\n' span_id:793) 
          (Token id:Id.Lit_Chars val:'object $sha\n' span_id:794) (Token id:Id.Lit_Chars val:'type commit\n' span_id:795) 
          (Token id:Id.Lit_Chars val:'tag guten tag\n' span_id:796) (Token id:Id.Lit_Chars val:'\n' span_id:797) 
          (Token id:Id.Lit_Chars val:'This is an invalid tag.\n' span_id:798) (Token id:Id.Lit_Chars val:'EOF\n' span_id:799) (Token id:Id.Lit_Chars val:'\n' span_id:800) 
          (Token
            id: Id.Lit_Chars
            val: '    tag=$(git hash-object -t tag -w --stdin <wrong-tag) &&\n'
            span_id: 801
          ) 
          (Token
            id: Id.Lit_Chars
            val: '    pack1=$(echo $tag $sha | git pack-objects tag-test) &&\n'
            span_id: 802
          ) (Token id:Id.Lit_Chars val:'    echo remove tag object &&\n' span_id:803) 
          (Token id:Id.Lit_Chars val:'    thirtyeight=${tag#??} &&\n' span_id:804) 
          (Token
            id: Id.Lit_Chars
            val: '    rm -f .git/objects/${tag%$thirtyeight}/$thirtyeight &&\n'
            span_id: 805
          ) 
          (Token
            id: Id.Lit_Chars
            val: '    git index-pack --strict tag-test-${pack1}.pack 2>err &&\n'
            span_id: 806
          ) (Token id:Id.Lit_Chars val:'    grep "^warning:.* expected .tagger. line" err\n' span_id:807)
        )
      }
    )
    (C {(test_done)})
  ]
)