From baad182cbcafb2f7332ad5864695a42a0354f684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Mon, 28 Mar 2011 11:31:58 +0200 Subject: [PATCH] Add GIT_EEXISTS error code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Martín Nieto --- include/git2/common.h | 3 +++ src/errors.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/git2/common.h b/include/git2/common.h index 57ab9c1ff..7d3518f82 100644 --- a/include/git2/common.h +++ b/include/git2/common.h @@ -161,6 +161,9 @@ /** This feature has not been implemented yet */ #define GIT_ENOTIMPLEMENTED (GIT_ERROR - 22) +/** A refernce or object of the same name already exists */ +#define GIT_EEXISTS (GIT_ERROR - 23) + GIT_BEGIN_DECL typedef struct { diff --git a/src/errors.c b/src/errors.c index f6b964837..3c0e8eb1f 100644 --- a/src/errors.c +++ b/src/errors.c @@ -28,7 +28,8 @@ static struct { {GIT_EINVALIDPATH, "The path is invalid" }, {GIT_EREVWALKOVER, "The revision walker is empty; there are no more commits left to iterate"}, {GIT_EINVALIDREFSTATE, "The state of the reference is not valid"}, - {GIT_ENOTIMPLEMENTED, "This feature has not been implemented yet"} + {GIT_ENOTIMPLEMENTED, "This feature has not been implemented yet"}, + {GIT_EEXISTS, "A reference with this name already exists"} }; const char *git_strerror(int num)