Skip to content

Commit 5a97e7b

Browse files
committed
Merge branch 'nd/pack-unreachable-objects-doc'
Doc update. * nd/pack-unreachable-objects-doc: pack-objects: validation and documentation about unreachable options
2 parents df20b62 + 58bd77b commit 5a97e7b

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Documentation/git-pack-objects.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,19 @@ Unexpected missing object will raise an error.
276276
locally created objects [without .promisor] and objects from the
277277
promisor remote [with .promisor].) This is used with partial clone.
278278

279+
--keep-unreachable::
280+
Objects unreachable from the refs in packs named with
281+
--unpacked= option are added to the resulting pack, in
282+
addition to the reachable objects that are not in packs marked
283+
with *.keep files. This implies `--revs`.
284+
285+
--pack-loose-unreachable::
286+
Pack unreachable loose objects (and their loose counterparts
287+
removed). This implies `--revs`.
288+
289+
--unpack-unreachable::
290+
Keep unreachable objects in loose form. This implies `--revs`.
291+
279292
SEE ALSO
280293
--------
281294
linkgit:git-rev-list[1]

builtin/pack-objects.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3241,6 +3241,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
32413241
fetch_if_missing = 0;
32423242
argv_array_push(&rp, "--exclude-promisor-objects");
32433243
}
3244+
if (unpack_unreachable || keep_unreachable || pack_loose_unreachable)
3245+
use_internal_rev_list = 1;
32443246

32453247
if (!reuse_object)
32463248
reuse_delta = 0;

0 commit comments

Comments
 (0)