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