Commit 1d37da3392276c16d49a3680e9bd6c22f2c3abd0

Carlos Martín Nieto 2013-10-30T16:25:49

merge: any non-zero return from the user is an error This fixes #1703.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/merge.c b/src/merge.c
index b07e8c5..a22801e 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -285,7 +285,7 @@ int git_repository_mergehead_foreach(git_repository *repo,
 		if ((error = git_oid_fromstr(&oid, line)) < 0)
 			goto cleanup;
 
-		if (cb(&oid, payload) < 0) {
+		if (cb(&oid, payload) != 0) {
 			error = GIT_EUSER;
 			goto cleanup;
 		}