rev-list: handle missing tree objects properly
Previously, we assumed only blob objects could be missing. This patch makes rev-list handle missing trees like missing blobs. The --missing=* and --exclude-promisor-objects flags now work for trees as they already do for blobs. This is demonstrated in t6112. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
f1d02daacf
commit
7c0fe330d5
15
revision.h
15
revision.h
@ -125,6 +125,21 @@ struct rev_info {
|
||||
line_level_traverse:1,
|
||||
tree_blobs_in_commit_order:1,
|
||||
|
||||
/*
|
||||
* Blobs are shown without regard for their existence.
|
||||
* But not so for trees: unless exclude_promisor_objects
|
||||
* is set and the tree in question is a promisor object;
|
||||
* OR ignore_missing_links is set, the revision walker
|
||||
* dies with a "bad tree object HASH" message when
|
||||
* encountering a missing tree. For callers that can
|
||||
* handle missing trees and want them to be filterable
|
||||
* and showable, set this to true. The revision walker
|
||||
* will filter and show such a missing tree as usual,
|
||||
* but will not attempt to recurse into this tree
|
||||
* object.
|
||||
*/
|
||||
do_not_die_on_missing_tree:1,
|
||||
|
||||
/* for internal use only */
|
||||
exclude_promisor_objects:1;
|
||||
|
||||
|
Reference in New Issue
Block a user