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

DESCRIPTION

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

OPTIONS

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
84       --object-format=<hash-algorithm>
85           Specify the given object format (hash algorithm) for the pack. The
86           valid values are sha1 and (if enabled) sha256. The default is the
87           algorithm for the current repository (set by
88           extensions.objectFormat), or sha1 if no value is set or outside a
89           repository.
90
91           This option cannot be used with --stdin.
92
93           THIS OPTION IS EXPERIMENTAL! SHA-256 support is experimental and
94           still in an early stage. A SHA-256 repository will in general not
95           be able to share work with "regular" SHA-1 repositories. It should
96           be assumed that, e.g., Git internal file formats in relation to
97           SHA-256 repositories may change in backwards-incompatible ways.
98           Only use --object-format=sha256 for testing purposes.
99

NOTES

101       Once the index has been created, the hash that goes into the name of
102       the pack/idx file is printed to stdout. If --stdin was also used then
103       this is prefixed by either "pack\t", or "keep\t" if a new .keep file
104       was successfully created. This is useful to remove a .keep file used as
105       a lock to prevent the race with git repack mentioned above.
106

GIT

108       Part of the git(1) suite
109
110
111
112Git 2.30.2                        2021-03-08                 GIT-INDEX-PACK(1)
Impressum