Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/tag.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-18 03:21:06 +0400
committerVicent Martí <tanoku@gmail.com>2012-05-18 03:26:26 +0400
commite172cf082e62aa421703080d0bccb7b8762c8bd4 (patch)
treec19f7b1be056a9176d4e865f5be5c69a5c2912c6 /src/tag.c
parent2e2e97858de18abd43f7e59fcc6151510c6d3272 (diff)
errors: Rename the generic return codes
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tag.c b/src/tag.c
index 13481c2a6..2a9ffee5b 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -168,7 +168,7 @@ static int retrieve_tag_reference(
return -1;
error = git_reference_lookup(&tag_ref, repo, ref_name_out->ptr);
- if (error < GIT_SUCCESS)
+ if (error < 0)
return error; /* Be it not foundo or corrupted */
*tag_reference_out = tag_ref;
@@ -254,7 +254,7 @@ static int git_tag_create__internal(
}
error = retrieve_tag_reference_oid(oid, &ref_name, repo, tag_name);
- if (error < GIT_SUCCESS && error != GIT_ENOTFOUND)
+ if (error < 0 && error != GIT_NOTFOUND)
return -1;
/** Ensure the tag name doesn't conflict with an already existing
@@ -262,7 +262,7 @@ static int git_tag_create__internal(
if (error == 0 && !allow_ref_overwrite) {
git_buf_free(&ref_name);
giterr_set(GITERR_TAG, "Tag already exists");
- return GIT_EEXISTS;
+ return GIT_EXISTS;
}
if (create_tag_annotation) {
@@ -332,7 +332,7 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
}
error = retrieve_tag_reference_oid(oid, &ref_name, repo, tag.tag_name);
- if (error < GIT_SUCCESS && error != GIT_ENOTFOUND)
+ if (error < 0 && error != GIT_NOTFOUND)
goto on_error;
/* We don't need these objects after this */
@@ -345,7 +345,7 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
* reference unless overwriting has explictly been requested **/
if (error == 0 && !allow_ref_overwrite) {
giterr_set(GITERR_TAG, "Tag already exists");
- return GIT_EEXISTS;
+ return GIT_EXISTS;
}
/* write the buffer */
@@ -414,7 +414,7 @@ static int tag_list_cb(const char *tag_name, void *payload)
return 0;
filter = (tag_filter_data *)payload;
- if (!*filter->pattern || p_fnmatch(filter->pattern, tag_name + GIT_REFS_TAGS_DIR_LEN, 0) == GIT_SUCCESS)
+ if (!*filter->pattern || p_fnmatch(filter->pattern, tag_name + GIT_REFS_TAGS_DIR_LEN, 0) == 0)
return git_vector_insert(filter->taglist, git__strdup(tag_name));
return 0;
@@ -428,7 +428,7 @@ int git_tag_list_match(git_strarray *tag_names, const char *pattern, git_reposit
assert(tag_names && repo && pattern);
- if (git_vector_init(&taglist, 8, NULL) < GIT_SUCCESS)
+ if (git_vector_init(&taglist, 8, NULL) < 0)
return -1;
filter.taglist = &taglist;