Commit e1859ea1 by Vicent Martí

Merge pull request #1283 from lznuaa/master

Fix local repository clone failure
parents aa3bf89d 88183c19
...@@ -318,12 +318,15 @@ static int local_download_pack( ...@@ -318,12 +318,15 @@ 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);
} }
} }
......
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