blob: f3ccc72f0d68f03cd7b3fb6a36aabc8d7c7772a1 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-index-pack(1)
2=================
3
4NAME
5----
6git-index-pack - Build pack index file for an existing packed archive
7
8
9SYNOPSIS
10--------
Junio C Hamanoa9b8d242007-05-19 04:51:5511[verse]
Junio C Hamanofce7c7e2008-07-02 03:06:3812'git index-pack' [-v] [-o <index-file>] <pack-file>
13'git index-pack' --stdin [--fix-thin] [--keep] [-v] [-o <index-file>]
Junio C Hamanoa9b8d242007-05-19 04:51:5514 [<pack-file>]
Junio C Hamano1a4e8412005-12-27 08:17:2315
16
17DESCRIPTION
18-----------
19Reads a packed archive (.pack) from the specified file, and
20builds a pack index file (.idx) for it. The packed archive
21together with the pack index can then be placed in the
22objects/pack/ directory of a git repository.
23
24
25OPTIONS
26-------
Junio C Hamano0d3c8152006-11-08 01:33:4127-v::
28Be verbose about what is going on, including progress status.
29
Junio C Hamano1a4e8412005-12-27 08:17:2330-o <index-file>::
31Write the generated pack index into the specified
32file. Without this option the name of pack index
33file is constructed from the name of packed archive
34file by replacing .pack with .idx (and the program
35fails if the name of packed archive does not end
36with .pack).
37
Junio C Hamano0d3c8152006-11-08 01:33:4138--stdin::
39When this flag is provided, the pack is read from stdin
40instead and a copy is then written to <pack-file>. If
41<pack-file> is not specified, the pack is written to
42objects/pack/ directory of the current git repository with
43a default name determined from the pack content. If
44<pack-file> is not specified consider using --keep to
45prevent a race condition between this process and
Junio C Hamano1aa40d22010-01-21 17:46:4346'git repack'.
Junio C Hamano0d3c8152006-11-08 01:33:4147
48--fix-thin::
Junio C Hamano4fdccb22010-02-19 09:58:1449Fix a "thin" pack produced by `git pack-objects --thin` (see
50linkgit:git-pack-objects[1] for details) by adding the
51excluded objects the deltified objects are based on to the
52pack. This option only makes sense in conjunction with --stdin.
Junio C Hamano0d3c8152006-11-08 01:33:4153
54--keep::
55Before moving the index into its final destination
56create an empty .keep file for the associated pack file.
57This option is usually necessary with --stdin to prevent a
Junio C Hamano1aa40d22010-01-21 17:46:4358simultaneous 'git repack' process from deleting
Junio C Hamano0d3c8152006-11-08 01:33:4159the newly constructed pack and index before refs can be
60updated to use objects contained in the pack.
61
62--keep='why'::
63Like --keep create a .keep file before moving the index into
64its final destination, but rather than creating an empty file
65place 'why' followed by an LF into the .keep file. The 'why'
66message can later be searched for within all .keep files to
67locate any which have outlived their usefulness.
68
Junio C Hamanoe90436a2007-04-22 07:22:1369--index-version=<version>[,<offset>]::
70This is intended to be used by the test suite only. It allows
71to force the version for the generated pack index, and to force
7264-bit index entries on objects located above the given offset.
73
Junio C Hamano4f1d8c42008-03-03 02:01:1674--strict::
75Die, if the pack contains broken objects or links.
76
Junio C Hamano0d3c8152006-11-08 01:33:4177
78Note
79----
80
81Once the index has been created, the list of object names is sorted
82and the SHA1 hash of that list is printed to stdout. If --stdin was
83also used then this is prefixed by either "pack\t", or "keep\t" if a
84new .keep file was successfully created. This is useful to remove a
Junio C Hamano1aa40d22010-01-21 17:46:4385.keep file used as a lock to prevent the race with 'git repack'
Junio C Hamano0d3c8152006-11-08 01:33:4186mentioned above.
87
Junio C Hamano1a4e8412005-12-27 08:17:2388
89Author
90------
91Written by Sergey Vlasov <vsu@altlinux.ru>
92
93Documentation
94-------------
95Documentation by Sergey Vlasov
96
97GIT
98---
Junio C Hamanof7c042d2008-06-06 22:50:5399Part of the linkgit:git[1] suite