1GIT-INDEX-PACK(1)                 Git Manual                 GIT-INDEX-PACK(1)
2
3
4

NAME

6       git-index-pack - Build pack index file for an existing packed archive
7

SYNOPSIS

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
13

DESCRIPTION

15       Reads a packed archive (.pack) from the specified file, and builds a
16       pack index file (.idx) for it. The packed archive together with the
17       pack index can then be placed in the objects/pack/ directory of a Git
18       repository.
19

OPTIONS

21       -v
22           Be verbose about what is going on, including progress status.
23
24       -o <index-file>
25           Write the generated pack index into the specified file. Without
26           this option the name of pack index file is constructed from the
27           name of packed archive file by replacing .pack with .idx (and the
28           program fails if the name of packed archive does not end with
29           .pack).
30
31       --stdin
32           When this flag is provided, the pack is read from stdin instead and
33           a copy is then written to <pack-file>. If <pack-file> is not
34           specified, the pack is written to objects/pack/ directory of the
35           current Git repository with a default name determined from the pack
36           content. If <pack-file> is not specified consider using --keep to
37           prevent a race condition between this process and git repack.
38
39       --fix-thin
40           Fix a "thin" pack produced by git pack-objects --thin (see git-
41           pack-objects(1) for details) by adding the excluded objects the
42           deltified objects are based on to the pack. This option only makes
43           sense in conjunction with --stdin.
44
45       --keep
46           Before moving the index into its final destination create an empty
47           .keep file for the associated pack file. This option is usually
48           necessary with --stdin to prevent a simultaneous git repack process
49           from deleting the newly constructed pack and index before refs can
50           be updated to use objects contained in the pack.
51
52       --keep=<msg>
53           Like --keep create a .keep file before moving the index into its
54           final destination, but rather than creating an empty file place
55           <msg> followed by an LF into the .keep file. The <msg> message can
56           later be searched for within all .keep files to locate any which
57           have outlived their usefulness.
58
59       --index-version=<version>[,<offset>]
60           This is intended to be used by the test suite only. It allows to
61           force the version for the generated pack index, and to force 64-bit
62           index entries on objects located above the given offset.
63
64       --strict
65           Die, if the pack contains broken objects or links.
66
67       --check-self-contained-and-connected
68           Die if the pack contains broken links. For internal use only.
69
70       --fsck-objects
71           Die if the pack contains broken objects. For internal use only.
72
73       --threads=<n>
74           Specifies the number of threads to spawn when resolving deltas.
75           This requires that index-pack be compiled with pthreads otherwise
76           this option is ignored with a warning. This is meant to reduce
77           packing time on multiprocessor machines. The required amount of
78           memory for the delta search window is however multiplied by the
79           number of threads. Specifying 0 will cause Git to auto-detect the
80           number of CPU’s and use maximum 3 threads.
81
82       --max-input-size=<size>
83           Die, if the pack is larger than <size>.
84

NOTES

86       Once the index has been created, the list of object names is sorted and
87       the SHA-1 hash of that list is printed to stdout. If --stdin was also
88       used then this is prefixed by either "pack\t", or "keep\t" if a new
89       .keep file was successfully created. This is useful to remove a .keep
90       file used as a lock to prevent the race with git repack mentioned
91       above.
92

GIT

94       Part of the git(1) suite
95
96
97
98Git 2.21.0                        02/24/2019                 GIT-INDEX-PACK(1)
Impressum