summaryrefslogtreecommitdiff
path: root/src/apply.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-06-25 21:24:49 +0900
committerEdward Thomson <ethomson@edwardthomson.com>2018-11-04 09:21:48 +0000
commitc3077ea0fa5ea8e0b27b1b47e95032da0591d861 (patch)
tree901b1d5ddd1476df31f4d56793ae163ab10a0a7f /src/apply.c
parent973bf0c804c1431827fea9fde14ca4b3ca2fe995 (diff)
downloadlibgit2-c3077ea0fa5ea8e0b27b1b47e95032da0591d861.tar.gz
apply: return a specific exit code on failure
Return `GIT_EAPPLYFAIL` on patch application failure so that users can determine that patch application failed due to a malformed/conflicting patch by looking at the error code.
Diffstat (limited to 'src/apply.c')
-rw-r--r--src/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apply.c b/src/apply.c
index 20d755790..ad24e6c61 100644
--- a/src/apply.c
+++ b/src/apply.c
@@ -24,7 +24,7 @@
#include "reader.h"
#define apply_err(...) \
- ( giterr_set(GITERR_PATCH, __VA_ARGS__), -1 )
+ ( giterr_set(GITERR_PATCH, __VA_ARGS__), GIT_EAPPLYFAIL )
typedef struct {
/* The lines that we allocate ourself are allocated out of the pool.