From c3077ea0fa5ea8e0b27b1b47e95032da0591d861 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Mon, 25 Jun 2018 21:24:49 +0900 Subject: 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. --- src/apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/apply.c') 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. -- cgit v1.2.1