Home Explore Blog CI



git

2nd chunk of `Documentation/git-repack.adoc`
afb916a8924b3b08921c9863d56467dc84099bd22cdcbe500000000100000fa1
 packs whose size is strictly less than `<n>`,
	where `<n>` represents a number of bytes, which can optionally
	be suffixed with "k", "m", or "g". Cruft packs whose size is
	greater than or equal to `<n>` are left as-is and not repacked.
	Useful when you want to avoid repacking large cruft pack(s) in
	repositories that have many and/or large unreachable objects.

--expire-to=<dir>::
	Write a cruft pack containing pruned objects (if any) to the
	directory `<dir>`. This option is useful for keeping a copy of
	any pruned objects in a separate directory as a backup. Only
	useful with `--cruft -d`.

-l::
	Pass the `--local` option to 'git pack-objects'. See
	linkgit:git-pack-objects[1].

-f::
	Pass the `--no-reuse-delta` option to `git-pack-objects`, see
	linkgit:git-pack-objects[1].

-F::
	Pass the `--no-reuse-object` option to `git-pack-objects`, see
	linkgit:git-pack-objects[1].

-q::
--quiet::
	Show no progress over the standard error stream and pass the `-q`
	option to 'git pack-objects'. See linkgit:git-pack-objects[1].

-n::
	Do not update the server information with
	'git update-server-info'.  This option skips
	updating local catalog files needed to publish
	this repository (or a direct copy of it)
	over HTTP or FTP.  See linkgit:git-update-server-info[1].

--window=<n>::
--depth=<n>::
	These two options affect how the objects contained in the pack are
	stored using delta compression. The objects are first internally
	sorted by type, size and optionally names and compared against the
	other objects within `--window` to see if using delta compression saves
	space. `--depth` limits the maximum delta depth; making it too deep
	affects the performance on the unpacker side, because delta data needs
	to be applied that many times to get to the necessary object.
+
The default value for --window is 10 and --depth is 50. The maximum
depth is 4095.

--threads=<n>::
	This option is passed through to `git pack-objects`.

--window-memory=<n>::
	This option provides an additional limit on top of `--window`;
	the window size will dynamically scale down so as to not take
	up more than '<n>' bytes in memory.  This is useful in
	repositories with a mix of large and small objects to not run
	out of memory with a large window, but still be able to take
	advantage of the large window for the smaller objects.  The
	size can be suffixed with "k", "m", or "g".
	`--window-memory=0` makes memory usage unlimited.  The default
	is taken from the `pack.windowMemory` configuration variable.
	Note that the actual memory usage will be the limit multiplied
	by the number of threads used by linkgit:git-pack-objects[1].

--max-pack-size=<n>::
	Maximum size of each output pack file. The size can be suffixed with
	"k", "m", or "g". The minimum size allowed is limited to 1 MiB.
	If specified, multiple packfiles may be created, which also
	prevents the creation of a bitmap index.
	The default is unlimited, unless the config variable
	`pack.packSizeLimit` is set. Note that this option may result in
	a larger and slower repository; see the discussion in
	`pack.packSizeLimit`.

--filter=<filter-spec>::
	Remove objects matching the filter specification from the
	resulting packfile and put them into a separate packfile. Note
	that objects used in the working directory are not filtered
	out. So for the split to fully work, it's best to perform it
	in a bare repo and to use the `-a` and `-d` options along with
	this option.  Also `--no-write-bitmap-index` (or the
	`repack.writebitmaps` config option set to `false`) should be
	used otherwise writing bitmap index will fail, as it supposes
	a single packfile containing all the objects. See
	linkgit:git-rev-list[1] for valid `<filter-spec>` forms.

--filter-to=<dir>::
	Write the pack containing filtered out objects to the
	directory `<dir>`. Only useful with `--filter`. This can be
	used for putting the pack on a separate object directory that
	is accessed through the Git alternates mechanism. **WARNING:**
	If the packfile

Title: Git Repack Options
Summary
The git-repack command has various options to customize the packing process, including size limits, delta compression, threading, and filtering, allowing for efficient management of repository objects and packs.