diff options
author | Matthew DeVore <matvore@google.com> | 2018-10-05 23:31:23 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-07 01:55:00 +0200 |
commit | 7c0fe330d5f3d2fc7aac57a19c7580ea2543c799 (patch) | |
tree | 715ad64110c66efc978120aaab51c5a875dc4911 /revision.h | |
parent | list-objects: always parse trees gently (diff) | |
download | git-7c0fe330d5f3d2fc7aac57a19c7580ea2543c799.tar.xz git-7c0fe330d5f3d2fc7aac57a19c7580ea2543c799.zip |
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>
Diffstat (limited to 'revision.h')
-rw-r--r-- | revision.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/revision.h b/revision.h index c599c34da9..5118aaaa92 100644 --- a/revision.h +++ b/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; |