Commit c84a9dd2 by Carlos Martín Nieto

local: recusrively insert non-branch objects into the packfile

When we insert e.g. a tag or tagged object into the packfile, we must
make sure to insert any referenced objects as well, or we will have
broken links.

Use the recursive version of packfile insertion to make sure we send
over not just the tagged object but also the objects it references.
parent 84511143
...@@ -544,7 +544,8 @@ static int local_download_pack( ...@@ -544,7 +544,8 @@ static int local_download_pack(
error = 0; error = 0;
} }
} else { } else {
error = git_packbuilder_insert(pack, &rhead->oid, rhead->name); /* Tag or some other wanted object. Add it on its own */
error = git_packbuilder_insert_recur(pack, &rhead->oid, rhead->name);
} }
git_object_free(obj); git_object_free(obj);
if (error < 0) if (error < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment