diff options
Diffstat (limited to 'src/fetchhead.c')
-rw-r--r-- | src/fetchhead.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fetchhead.c b/src/fetchhead.c index 7c37be4c6..2f217fad1 100644 --- a/src/fetchhead.c +++ b/src/fetchhead.c @@ -260,8 +260,8 @@ int git_repository_fetchhead_foreach(git_repository *repo, while ((line = git__strsep(&buffer, "\n")) != NULL) { ++line_num; - if ((error = fetchhead_ref_parse(&oid, &is_merge, &name, &remote_url, - line, line_num)) < 0) + if ((error = fetchhead_ref_parse( + &oid, &is_merge, &name, &remote_url, line, line_num)) < 0) goto done; if (git_buf_len(&name) > 0) @@ -269,10 +269,11 @@ int git_repository_fetchhead_foreach(git_repository *repo, else ref_name = NULL; - error = GITERR_CALLBACK( - cb(ref_name, remote_url, &oid, is_merge, payload) ); - if (error) + error = cb(ref_name, remote_url, &oid, is_merge, payload); + if (error) { + GITERR_CALLBACK(error); goto done; + } } if (*buffer) { |