mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 18:30:56 +00:00
Merge pull request #1283 from lznuaa/master
Fix local repository clone failure
This commit is contained in:
commit
e1859ea184
@ -318,12 +318,15 @@ static int local_download_pack(
|
||||
|
||||
if (!git_object_lookup((git_object**)&commit, t->repo, &oid, GIT_OBJ_COMMIT)) {
|
||||
const git_oid *tree_oid = git_commit_tree_id(commit);
|
||||
git_commit_free(commit);
|
||||
|
||||
/* Add the commit and its tree */
|
||||
if ((error = git_packbuilder_insert(pack, &oid, NULL)) < 0 ||
|
||||
(error = git_packbuilder_insert_tree(pack, tree_oid)) < 0)
|
||||
(error = git_packbuilder_insert_tree(pack, tree_oid)) < 0) {
|
||||
git_commit_free(commit);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
git_commit_free(commit);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user