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=why
53           Like --keep create a .keep file before moving the index into its
54           final destination, but rather than creating an empty file place why
55           followed by an LF into the .keep file. The why message can later be
56           searched for within all .keep files to locate any which have
57           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

NOTE

68       Once the index has been created, the list of object names is sorted and
69       the SHA1 hash of that list is printed to stdout. If --stdin was also
70       used then this is prefixed by either "pack\t", or "keep\t" if a new
71       .keep file was successfully created. This is useful to remove a .keep
72       file used as a lock to prevent the race with git repack mentioned
73       above.
74

AUTHOR

76       Written by Sergey Vlasov <vsu@altlinux.ru[1]>
77

DOCUMENTATION

79       Documentation by Sergey Vlasov
80

GIT

82       Part of the git(1) suite
83

NOTES

85        1. vsu@altlinux.ru
86           mailto:vsu@altlinux.ru
87
88
89
90Git 1.7.1                         08/16/2017                 GIT-INDEX-PACK(1)
Impressum