merge: any non-zero return from the user is an error

This fixes #1703.
This commit is contained in:
Carlos Martín Nieto 2013-10-30 16:25:49 +01:00
parent 97d32abb49
commit 1d37da3392

View File

@ -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;
}