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.
37
38 --fix-thin
39 Fix a "thin" pack produced by git pack-objects --thin (see git-
40 pack-objects(1) for details) by adding the excluded objects the
41 deltified objects are based on to the pack. This option only makes
42 sense in conjunction with --stdin.
43
44 --keep
45 Before moving the index into its final destination create an empty
46 .keep file for the associated pack file. This option is usually
47 necessary with --stdin to prevent a simultaneous git repack process
48 from deleting the newly constructed pack and index before refs can
49 be updated to use objects contained in the pack.
50
51 --keep=<msg>
52 Like --keep create a .keep file before moving the index into its
53 final destination, but rather than creating an empty file place
54 <msg> followed by an LF into the .keep file. The <msg> message can
55 later be searched for within all .keep files to locate any which
56 have outlived their usefulness.
57
58 --index-version=<version>[,<offset>]
59 This is intended to be used by the test suite only. It allows to
60 force the version for the generated pack index, and to force 64-bit
61 index entries on objects located above the given offset.
62
63 --strict
64 Die, if the pack contains broken objects or links.
65
66 --check-self-contained-and-connected
67 Die if the pack contains broken links. For internal use only.
68
69 --fsck-objects
70 Die if the pack contains broken objects. For internal use only.
71
72 --threads=<n>
73 Specifies the number of threads to spawn when resolving deltas.
74 This requires that index-pack be compiled with pthreads otherwise
75 this option is ignored with a warning. This is meant to reduce
76 packing time on multiprocessor machines. The required amount of
77 memory for the delta search window is however multiplied by the
78 number of threads. Specifying 0 will cause Git to auto-detect the
79 number of CPU’s and use maximum 3 threads.
80
81 --max-input-size=<size>
82 Die, if the pack is larger than <size>.
83
85 Once the index has been created, the list of object names is sorted and
86 the SHA-1 hash of that list is printed to stdout. If --stdin was also
87 used then this is prefixed by either "pack\t", or "keep\t" if a new
88 .keep file was successfully created. This is useful to remove a .keep
89 file used as a lock to prevent the race with git repack mentioned
90 above.
91
93 Part of the git(1) suite
94
95
96
97Git 2.26.2 2020-04-20 GIT-INDEX-PACK(1)