From 787768c2d70dfcd1c9ebc1854b5d0f67d2e6d4d9 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Fri, 22 Jun 2018 19:07:54 +0900 Subject: index: return a unique error code on dirty index When the index is dirty, return GIT_EINDEXDIRTY so that consumers can identify the exact problem programatically. --- include/git2/errors.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/git2') diff --git a/include/git2/errors.h b/include/git2/errors.h index 6f5580253..00fbed157 100644 --- a/include/git2/errors.h +++ b/include/git2/errors.h @@ -55,6 +55,7 @@ typedef enum { GIT_ITEROVER = -31, /**< Signals end of iteration with iterator */ GIT_RETRY = -32, /**< Internal only */ GIT_EMISMATCH = -33, /**< Hashsum mismatch in object */ + GIT_EINDEXDIRTY = -34, /**< Unsaved changes in the index would be overwritten */ } git_error_code; /** -- cgit v1.2.1