summaryrefslogtreecommitdiff
path: root/src/clone.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-01-22 22:52:06 +0000
committerGitHub <noreply@github.com>2019-01-22 22:52:06 +0000
commit635693d3bc55770ec7a6640ba3f2f0ee434a6042 (patch)
tree9156b0eae8ff19b7e2e0bb8eb76d38ce35baac5c /src/clone.c
parent6b2cd0ed599aec32444166b7ad5b0c9fdd88b498 (diff)
parenta27a4de6f8003961d38958893c6c637395c7cc04 (diff)
downloadlibgit2-635693d3bc55770ec7a6640ba3f2f0ee434a6042.tar.gz
Merge pull request #4917 from libgit2/ethomson/giterr
Move `giterr` to `git_error`
Diffstat (limited to 'src/clone.c')
-rw-r--r--src/clone.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/clone.c b/src/clone.c
index e2bf32069..8688da9e4 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -176,7 +176,7 @@ static int update_head_to_remote(
refspec = git_remote__matching_refspec(remote, git_buf_cstr(&branch));
if (refspec == NULL) {
- giterr_set(GITERR_NET, "the remote's default branch does not fit the refspec configuration");
+ git_error_set(GIT_ERROR_NET, "the remote's default branch does not fit the refspec configuration");
error = GIT_EINVALIDSPEC;
goto cleanup;
}
@@ -332,7 +332,7 @@ static int clone_into(git_repository *repo, git_remote *_remote, const git_fetch
assert(repo && _remote);
if (!git_repository_is_empty(repo)) {
- giterr_set(GITERR_INVALID, "the repository is not empty");
+ git_error_set(GIT_ERROR_INVALID, "the repository is not empty");
return -1;
}
@@ -400,11 +400,11 @@ int git_clone(
if (_options)
memcpy(&options, _options, sizeof(git_clone_options));
- GITERR_CHECK_VERSION(&options, GIT_CLONE_OPTIONS_VERSION, "git_clone_options");
+ GIT_ERROR_CHECK_VERSION(&options, GIT_CLONE_OPTIONS_VERSION, "git_clone_options");
/* Only clone to a new directory or an empty directory */
if (git_path_exists(local_path) && !git_path_is_empty_dir(local_path)) {
- giterr_set(GITERR_INVALID,
+ git_error_set(GIT_ERROR_INVALID,
"'%s' exists and is not an empty directory", local_path);
return GIT_EEXISTS;
}
@@ -441,14 +441,14 @@ int git_clone(
if (error != 0) {
git_error_state last_error = {0};
- giterr_state_capture(&last_error, error);
+ git_error_state_capture(&last_error, error);
git_repository_free(repo);
repo = NULL;
(void)git_futils_rmdir_r(local_path, NULL, rmdir_flags);
- giterr_state_restore(&last_error);
+ git_error_state_restore(&last_error);
}
*out = repo;
@@ -496,7 +496,7 @@ static int clone_local_into(git_repository *repo, git_remote *remote, const git_
assert(repo && remote);
if (!git_repository_is_empty(repo)) {
- giterr_set(GITERR_INVALID, "the repository is not empty");
+ git_error_set(GIT_ERROR_INVALID, "the repository is not empty");
return -1;
}