1GIT-INDEX-PACK(1) Git Manual GIT-INDEX-PACK(1)
2
3
4
6 git-index-pack - Build pack index file for an existing packed archive
7
9 git-index-pack [-v] [-o <index-file>] <pack-file>
10 git-index-pack --stdin [--fix-thin] [--keep] [-v] [-o <index-file>]
11 [<pack-file>]
12
14 Reads a packed archive (.pack) from the specified file, and builds a
15 pack index file (.idx) for it. The packed archive together with the
16 pack index can then be placed in the objects/pack/ directory of a git
17 repository.
18
20 -v
21 Be verbose about what is going on, including progress status.
22
23 -o <index-file>
24 Write the generated pack index into the specified file. Without
25 this option the name of pack index file is constructed from the
26 name of packed archive file by replacing .pack with .idx (and the
27 program fails if the name of packed archive does not end with
28 .pack).
29
30 --stdin
31 When this flag is provided, the pack is read from stdin instead and
32 a copy is then written to <pack-file>. If <pack-file> is not
33 specified, the pack is written to objects/pack/ directory of the
34 current git repository with a default name determined from the pack
35 content. If <pack-file> is not specified consider using --keep to
36 prevent a race condition between this process and :git-repack(1) .
37
38 --fix-thin
39 It is possible for git-pack-objects(1) to build "thin" pack, which
40 records objects in deltified form based on objects not included in
41 the pack to reduce network traffic. Those objects are expected to
42 be present on the receiving end and they must be included in the
43 pack for that pack to be self contained and indexable. Without this
44 option any attempt to index a thin pack will fail. This option only
45 makes sense in conjunction with --stdin.
46
47 --keep
48 Before moving the index into its final destination create an empty
49 .keep file for the associated pack file. This option is usually
50 necessary with --stdin to prevent a simultaneous git-repack(1)
51 process from deleting the newly constructed pack and index before
52 refs can be updated to use objects contained in the pack.
53
54 --keep=why
55 Like --keep create a .keep file before moving the index into its
56 final destination, but rather than creating an empty file place why
57 followed by an LF into the .keep file. The why message can later be
58 searched for within all .keep files to locate any which have
59 outlived their usefulness.
60
61 --index-version=<version>[,<offset>]
62 This is intended to be used by the test suite only. It allows to
63 force the version for the generated pack index, and to force 64-bit
64 index entries on objects located above the given offset.
65
67 Once the index has been created, the list of object names is sorted and
68 the SHA1 hash of that list is printed to stdout. If --stdin was also
69 used then this is prefixed by either "pack\t", or "keep\t" if a new
70 .keep file was successfully created. This is useful to remove a .keep
71 file used as a lock to prevent the race with git-repack(1) mentioned
72 above.
73
75 Written by Sergey Vlasov <vsu@altlinux.ru>
76
78 Documentation by Sergey Vlasov
79
81 Part of the git(7) suite
82
83
84
85
86Git 1.5.3.3 10/09/2007 GIT-INDEX-PACK(1)