diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-11-08 11:04:01 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-11-08 11:04:01 +0900 |
| commit | 57e216d03d3f6630771530f9c3feb0aa7f8aaad4 (patch) | |
| tree | 0fe416abee2bec6823cb5f86d18f3281d7a55036 /list-objects.c | |
| parent | fe84aa522896b437ff0c03e60f8ea6a05aeb411d (diff) | |
| parent | 9830926c7db626e374b887eeecb96515e2956638 (diff) | |
| download | git-57e216d03d3f6630771530f9c3feb0aa7f8aaad4.tar.xz | |
Merge branch 'kn/rev-list-missing-fix'
"git rev-list --missing" did not work for missing commit objects,
which has been corrected.
* kn/rev-list-missing-fix:
rev-list: add commit object support in `--missing` option
rev-list: move `show_commit()` to the bottom
revision: rename bit to `do_not_die_on_missing_objects`
Diffstat (limited to 'list-objects.c')
| -rw-r--r-- | list-objects.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/list-objects.c b/list-objects.c index c25c72b32c..f4e1104b56 100644 --- a/list-objects.c +++ b/list-objects.c @@ -177,7 +177,7 @@ static void process_tree(struct traversal_context *ctx, is_promisor_object(&obj->oid)) return; - if (!revs->do_not_die_on_missing_tree) + if (!revs->do_not_die_on_missing_objects) die("bad tree object %s", oid_to_hex(&obj->oid)); } @@ -389,6 +389,9 @@ static void do_traverse(struct traversal_context *ctx) */ if (!ctx->revs->tree_objects) ; /* do not bother loading tree */ + else if (ctx->revs->do_not_die_on_missing_objects && + oidset_contains(&ctx->revs->missing_commits, &commit->object.oid)) + ; else if (repo_get_commit_tree(the_repository, commit)) { struct tree *tree = repo_get_commit_tree(the_repository, commit); |
