X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=builtin%2Fpack-objects.c;h=6d62aaf59a030de6845dd1d27c9e9fa9421267b9;hb=3c12d0b885918fb5c6d5cb2be538639a52e1ef53;hp=24df0c98f743a87a6cdc558aa7ac324c95e5d1ad;hpb=6885cd7dc573b1750b8d895820b8b2f56285f070;p=thirdparty%2Fgit.git diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 24df0c98f7..6d62aaf59a 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -634,7 +634,7 @@ static int mark_tagged(const char *path, const struct object_id *oid, int flag, if (entry) entry->tagged = 1; - if (!peel_ref(path, &peeled)) { + if (!peel_iterated_oid(oid, &peeled)) { entry = packlist_find(&to_pack, &peeled); if (entry) entry->tagged = 1; @@ -2814,13 +2814,11 @@ static void add_tag_chain(const struct object_id *oid) } } -static int add_ref_tag(const char *path, const struct object_id *oid, int flag, void *cb_data) +static int add_ref_tag(const char *tag, const struct object_id *oid, int flag, void *cb_data) { struct object_id peeled; - if (starts_with(path, "refs/tags/") && /* is a tag? */ - !peel_ref(path, &peeled) && /* peelable? */ - obj_is_packed(&peeled)) /* object packed? */ + if (!peel_iterated_oid(oid, &peeled) && obj_is_packed(&peeled)) add_tag_chain(oid); return 0; } @@ -3760,7 +3758,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) } cleanup_preferred_base(); if (include_tag && nr_result) - for_each_ref(add_ref_tag, NULL); + for_each_tag_ref(add_ref_tag, NULL); stop_progress(&progress_state); trace2_region_leave("pack-objects", "enumerate-objects", the_repository);