mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-23 09:10:46 +00:00
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.
This commit is contained in:
parent
84511143fd
commit
c84a9dd2da
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user