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