vendor/libgit2/src/clone.c in rugged-0.27.7 vs vendor/libgit2/src/clone.c in rugged-0.27.9
- old
+ new
@@ -46,11 +46,11 @@
/* Create the new branch */
if ((error = git_buf_printf(&refname, GIT_REFS_HEADS_DIR "%s", name)) < 0)
return error;
error = git_reference_create(&branch_ref, repo, git_buf_cstr(&refname), target, 0, log_message);
- git_buf_dispose(&refname);
+ git_buf_free(&refname);
git_commit_free(head_obj);
if (!error)
*branch = branch_ref;
else
@@ -85,12 +85,12 @@
goto cleanup;
error = 0;
cleanup:
- git_buf_dispose(&remote_key);
- git_buf_dispose(&merge_key);
+ git_buf_free(&remote_key);
+ git_buf_free(&merge_key);
return error;
}
static int create_tracking_branch(
git_reference **branch,
@@ -193,12 +193,12 @@
remote_head_id,
git_buf_cstr(&branch),
reflog_message);
cleanup:
- git_buf_dispose(&remote_master_name);
- git_buf_dispose(&branch);
+ git_buf_free(&remote_master_name);
+ git_buf_free(&branch);
return error;
}
static int update_head_to_branch(
@@ -223,11 +223,11 @@
retcode = update_head_to_new_branch(repo, git_reference_target(remote_ref), branch,
reflog_message);
cleanup:
git_reference_free(remote_ref);
- git_buf_dispose(&remote_branch_name);
+ git_buf_free(&remote_branch_name);
return retcode;
}
static int default_repository_create(git_repository **out, const char *path, int bare, void *payload)
{
@@ -349,11 +349,11 @@
error = checkout_branch(repo, remote, co_opts, branch, git_buf_cstr(&reflog_message));
cleanup:
git_remote_free(remote);
- git_buf_dispose(&reflog_message);
+ git_buf_free(&reflog_message);
return error;
}
int git_clone__should_clone_local(const char *url_or_path, git_clone_local_t local)
@@ -376,11 +376,11 @@
is_local = (!is_url || local != GIT_CLONE_LOCAL_AUTO) &&
git_path_isdir(path);
done:
- git_buf_dispose(&fromurl);
+ git_buf_free(&fromurl);
return is_local;
}
int git_clone(
git_repository **out,
@@ -508,11 +508,11 @@
if ((error = git_path_from_url_or_path(&src_path, git_remote_url(remote))) < 0)
return error;
/* Copy .git/objects/ from the source to the target */
if ((error = git_repository_open(&src, git_buf_cstr(&src_path))) < 0) {
- git_buf_dispose(&src_path);
+ git_buf_free(&src_path);
return error;
}
if (git_repository_item_path(&src_odb, src, GIT_REPOSITORY_ITEM_OBJECTS) < 0
|| git_repository_item_path(&dst_odb, repo, GIT_REPOSITORY_ITEM_OBJECTS) < 0) {
@@ -547,12 +547,12 @@
goto cleanup;
error = checkout_branch(repo, remote, co_opts, branch, git_buf_cstr(&reflog_message));
cleanup:
- git_buf_dispose(&reflog_message);
- git_buf_dispose(&src_path);
- git_buf_dispose(&src_odb);
- git_buf_dispose(&dst_odb);
+ git_buf_free(&reflog_message);
+ git_buf_free(&src_path);
+ git_buf_free(&src_odb);
+ git_buf_free(&dst_odb);
git_repository_free(src);
return error;
}