summaryrefslogtreecommitdiff
path: root/bundle.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-13 19:03:22 -0700
committerJunio C Hamano <gitster@pobox.com>2011-10-13 19:03:22 -0700
commit0941d6054524bc91f45bf3cbb1c641712b0e0e6d (patch)
treec2ff08811332fe9247ca57f124863d8289ba7844 /bundle.c
parentdd57c76e84372bf16c6bdba9a1bd49da3e617339 (diff)
parent86a0a408b900eecc9d0d4a1eb8ae223181e96679 (diff)
downloadgit-0941d6054524bc91f45bf3cbb1c641712b0e0e6d.tar.gz
Merge branch 'rs/pending'
* rs/pending: commit: factor out clear_commit_marks_for_object_array checkout: use leak_pending flag bundle: use leak_pending flag bisect: use leak_pending flag revision: add leak_pending flag checkout: use add_pending_{object,sha1} in orphan check revision: factor out add_pending_sha1 checkout: check for "Previous HEAD" notice in t2020 Conflicts: builtin/checkout.c revision.c
Diffstat (limited to 'bundle.c')
-rw-r--r--bundle.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/bundle.c b/bundle.c
index 6bf849740c..f82baae3bd 100644
--- a/bundle.c
+++ b/bundle.c
@@ -122,11 +122,8 @@ int verify_bundle(struct bundle_header *header, int verbose)
req_nr = revs.pending.nr;
setup_revisions(2, argv, &revs, NULL);
- memset(&refs, 0, sizeof(struct object_array));
- for (i = 0; i < revs.pending.nr; i++) {
- struct object_array_entry *e = revs.pending.objects + i;
- add_object_array(e->item, e->name, &refs);
- }
+ refs = revs.pending;
+ revs.leak_pending = 1;
if (prepare_revision_walk(&revs))
die("revision walk setup failed");
@@ -144,8 +141,8 @@ int verify_bundle(struct bundle_header *header, int verbose)
refs.objects[i].name);
}
- for (i = 0; i < refs.nr; i++)
- clear_commit_marks((struct commit *)refs.objects[i].item, -1);
+ clear_commit_marks_for_object_array(&refs, ALL_REV_FLAGS);
+ free(refs.objects);
if (verbose) {
struct ref_list *r;