summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-18 01:48:50 +0200
committerVicent Martí <tanoku@gmail.com>2012-05-18 01:48:50 +0200
commit904b67e69fa15b7a3246e43b3d78645ffa2331f6 (patch)
tree3be54c31248759ba27a08cef52558385116d9b19 /src/commit.c
parente172cf082e62aa421703080d0bccb7b8762c8bd4 (diff)
downloadlibgit2-904b67e69fa15b7a3246e43b3d78645ffa2331f6.tar.gz
errors: Rename error codesbreaking-changes
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commit.c b/src/commit.c
index 1c6bee97a..2bf12f3a5 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -100,7 +100,7 @@ static int update_reference(git_repository *repo, git_oid *oid, const char *ref_
/* If we haven't found the reference at all, we assume we need to create
* a new reference and that's it */
- if (res == GIT_NOTFOUND) {
+ if (res == GIT_ENOTFOUND) {
giterr_clear();
return git_reference_create_oid(NULL, repo, ref_name, oid, 1);
}
@@ -125,7 +125,7 @@ static int update_reference(git_repository *repo, git_oid *oid, const char *ref_
* this is means we're creating a new branch, for example.
* We need to create a new direct reference with that name
*/
- if (res == GIT_NOTFOUND) {
+ if (res == GIT_ENOTFOUND) {
giterr_clear();
res = git_reference_create_oid(NULL, repo, sym_target, oid, 1);
git_reference_free(ref);
@@ -320,7 +320,7 @@ int git_commit_parent(git_commit **parent, git_commit *commit, unsigned int n)
parent_oid = git_vector_get(&commit->parent_oids, n);
if (parent_oid == NULL) {
giterr_set(GITERR_INVALID, "Parent %u does not exist", n);
- return GIT_NOTFOUND;
+ return GIT_ENOTFOUND;
}
return git_commit_lookup(parent, commit->object.repo, parent_oid);