summaryrefslogtreecommitdiff
path: root/include/git2
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 /include/git2
parente172cf082e62aa421703080d0bccb7b8762c8bd4 (diff)
downloadlibgit2-904b67e69fa15b7a3246e43b3d78645ffa2331f6.tar.gz
errors: Rename error codesbreaking-changes
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/branch.h4
-rw-r--r--include/git2/errors.h11
-rw-r--r--include/git2/odb.h8
-rw-r--r--include/git2/refspec.h2
-rw-r--r--include/git2/status.h2
-rw-r--r--include/git2/submodule.h4
-rw-r--r--include/git2/tag.h4
-rw-r--r--include/git2/tree.h2
8 files changed, 19 insertions, 18 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h
index 5ffc7ddd5..e2432bcfc 100644
--- a/include/git2/branch.h
+++ b/include/git2/branch.h
@@ -63,7 +63,7 @@ GIT_EXTERN(int) git_branch_create(
* @param branch_type Type of the considered branch. This should
* be valued with either GIT_BRANCH_LOCAL or GIT_BRANCH_REMOTE.
*
- * @return 0 on success, GIT_NOTFOUND if the branch
+ * @return 0 on success, GIT_ENOTFOUND if the branch
* doesn't exist or an error code.
*/
GIT_EXTERN(int) git_branch_delete(
@@ -108,7 +108,7 @@ GIT_EXTERN(int) git_branch_list(
*
* @param force Overwrite existing branch.
*
- * @return 0 on success, GIT_NOTFOUND if the branch
+ * @return 0 on success, GIT_ENOTFOUND if the branch
* doesn't exist or an error code.
*/
GIT_EXTERN(int) git_branch_move(
diff --git a/include/git2/errors.h b/include/git2/errors.h
index 361c0aca0..fb6670004 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -58,12 +58,13 @@ enum {
enum {
GIT_OK = 0,
GIT_ERROR = -1,
- GIT_NOTFOUND = -3,
- GIT_EXISTS = -23,
- GIT_AMBIGUOUS = -29,
+ GIT_ENOTFOUND = -3,
+ GIT_EEXISTS = -4,
+ GIT_EAMBIGUOUS = -5,
+ GIT_EBUFS = -6,
+
GIT_PASSTHROUGH = -30,
- GIT_SHORTBUFFER = -32,
- GIT_REVWALKOVER = -33,
+ GIT_REVWALKOVER = -31,
};
typedef struct {
diff --git a/include/git2/odb.h b/include/git2/odb.h
index 6f448f657..1df193389 100644
--- a/include/git2/odb.h
+++ b/include/git2/odb.h
@@ -109,7 +109,7 @@ GIT_EXTERN(void) git_odb_free(git_odb *db);
* @param id identity of the object to read.
* @return
* - 0 if the object was read;
- * - GIT_NOTFOUND if the object is not in the database.
+ * - GIT_ENOTFOUND if the object is not in the database.
*/
GIT_EXTERN(int) git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id);
@@ -136,8 +136,8 @@ GIT_EXTERN(int) git_odb_read(git_odb_object **out, git_odb *db, const git_oid *i
* @param short_id a prefix of the id of the object to read.
* @param len the length of the prefix
* @return 0 if the object was read;
- * GIT_NOTFOUND if the object is not in the database.
- * GIT_AMBIGUOUS if the prefix is ambiguous (several objects match the prefix)
+ * GIT_ENOTFOUND if the object is not in the database.
+ * GIT_EAMBIGUOUS if the prefix is ambiguous (several objects match the prefix)
*/
GIT_EXTERN(int) git_odb_read_prefix(git_odb_object **out, git_odb *db, const git_oid *short_id, unsigned int len);
@@ -157,7 +157,7 @@ GIT_EXTERN(int) git_odb_read_prefix(git_odb_object **out, git_odb *db, const git
* @param id identity of the object to read.
* @return
* - 0 if the object was read;
- * - GIT_NOTFOUND if the object is not in the database.
+ * - GIT_ENOTFOUND if the object is not in the database.
*/
GIT_EXTERN(int) git_odb_read_header(size_t *len_p, git_otype *type_p, git_odb *db, const git_oid *id);
diff --git a/include/git2/refspec.h b/include/git2/refspec.h
index c46c1876a..c0a8eabfe 100644
--- a/include/git2/refspec.h
+++ b/include/git2/refspec.h
@@ -51,7 +51,7 @@ GIT_EXTERN(int) git_refspec_src_matches(const git_refspec *refspec, const char *
* @param outlen the size ouf the `out` buffer
* @param spec the refspec
* @param name the name of the reference to transform
- * @return 0, GIT_SHORTBUFFER or another error
+ * @return 0, GIT_EBUFS or another error
*/
GIT_EXTERN(int) git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name);
diff --git a/include/git2/status.h b/include/git2/status.h
index 080db9f3c..6a424dfd6 100644
--- a/include/git2/status.h
+++ b/include/git2/status.h
@@ -131,7 +131,7 @@ GIT_EXTERN(int) git_status_foreach_ext(
* @param status_flags the status value
* @param repo a repository object
* @param path the file to retrieve status for, rooted at the repo's workdir
- * @return GIT_EINVALIDPATH when `path` points at a folder, GIT_NOTFOUND when
+ * @return GIT_EINVALIDPATH when `path` points at a folder, GIT_ENOTFOUND when
* the file doesn't exist in any of HEAD, the index or the worktree,
* 0 otherwise
*/
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index 9e6118b98..930168275 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -85,13 +85,13 @@ GIT_EXTERN(int) git_submodule_foreach(
*
* Given either the submodule name or path (they are ususally the same),
* this returns a structure describing the submodule. If the submodule
- * does not exist, this will return GIT_NOTFOUND and set the submodule
+ * does not exist, this will return GIT_ENOTFOUND and set the submodule
* pointer to NULL.
*
* @param submodule Pointer to submodule description object pointer..
* @param repo The repository.
* @param name The name of the submodule. Trailing slashes will be ignored.
- * @return 0 on success, GIT_NOTFOUND if submodule does not exist, -1 on error
+ * @return 0 on success, GIT_ENOTFOUND if submodule does not exist, -1 on error
*/
GIT_EXTERN(int) git_submodule_lookup(
git_submodule **submodule,
diff --git a/include/git2/tag.h b/include/git2/tag.h
index 7f318adf9..859c28995 100644
--- a/include/git2/tag.h
+++ b/include/git2/tag.h
@@ -143,7 +143,7 @@ GIT_EXTERN(const char *) git_tag_message(git_tag *tag);
* @param oid Pointer where to store the OID of the
* newly created tag. If the tag already exists, this parameter
* will be the oid of the existing tag, and the function will
- * return a GIT_EXISTS error code.
+ * return a GIT_EEXISTS error code.
*
* @param repo Repository where to store the tag
*
@@ -199,7 +199,7 @@ GIT_EXTERN(int) git_tag_create_frombuffer(
* @param oid Pointer where to store the OID of the provided
* target object. If the tag already exists, this parameter
* will be filled with the oid of the existing pointed object
- * and the function will return a GIT_EXISTS error code.
+ * and the function will return a GIT_EEXISTS error code.
*
* @param repo Repository where to store the lightweight tag
*
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 3b3b0e2f8..777f8ff0d 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -278,7 +278,7 @@ GIT_EXTERN(int) git_treebuilder_write(git_oid *oid, git_repository *repo, git_tr
* @param subtree Pointer where to store the subtree
* @param root A previously loaded tree which will be the root of the relative path
* @param subtree_path Path to the contained subtree
- * @return 0 on success; GIT_NOTFOUND if the path does not lead to a subtree
+ * @return 0 on success; GIT_ENOTFOUND if the path does not lead to a subtree
*/
GIT_EXTERN(int) git_tree_get_subtree(git_tree **subtree, git_tree *root, const char *subtree_path);