summaryrefslogtreecommitdiffstats
path: root/bundle.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-12-19 19:58:33 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-19 19:58:34 +0100
commit1df37ef81aaa0589b2022b7f3666afc46ac8fe15 (patch)
tree064ef7e0726df8d12a4ae1b998da001f7c0f094e /bundle.c
parentMerge branch 'mh/doc-windows-home-env' (diff)
parentbundle: remove unneeded code (diff)
downloadgit-1df37ef81aaa0589b2022b7f3666afc46ac8fe15.tar.xz
git-1df37ef81aaa0589b2022b7f3666afc46ac8fe15.zip
Merge branch 'tc/bundle-with-tag-remove-workaround'
"git bundle create" with an annotated tag on the positive end of the revision range had a workaround code for older limitation in the revision walker, which has become unnecessary. * tc/bundle-with-tag-remove-workaround: bundle: remove unneeded code
Diffstat (limited to 'bundle.c')
-rw-r--r--bundle.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/bundle.c b/bundle.c
index 4e53ddfca2..83c08e65cb 100644
--- a/bundle.c
+++ b/bundle.c
@@ -420,36 +420,6 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
e->name);
goto skip_write_ref;
}
- /*
- * If you run "git bundle create bndl v1.0..v2.0", the
- * name of the positive ref is "v2.0" but that is the
- * commit that is referenced by the tag, and not the tag
- * itself.
- */
- if (!oideq(&oid, &e->item->oid)) {
- /*
- * Is this the positive end of a range expressed
- * in terms of a tag (e.g. v2.0 from the range
- * "v1.0..v2.0")?
- */
- struct commit *one = lookup_commit_reference(revs->repo, &oid);
- struct object *obj;
-
- if (e->item == &(one->object)) {
- /*
- * Need to include e->name as an
- * independent ref to the pack-objects
- * input, so that the tag is included
- * in the output; otherwise we would
- * end up triggering "empty bundle"
- * error.
- */
- obj = parse_object_or_die(&oid, e->name);
- obj->flags |= SHOWN;
- add_pending_object(revs, obj, e->name);
- }
- goto skip_write_ref;
- }
ref_count++;
write_or_die(bundle_fd, oid_to_hex(&e->item->oid), the_hash_algo->hexsz);