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