diff options
-rw-r--r-- | src/lib.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1754,9 +1754,13 @@ static int repo_refs_write( while (!(e = git_branch_next(&ref, &_btype, branch_iter))) { e = repo_refs_branches_each(refs_fd, repo, ref); git_reference_free(ref); - if (e) { + if (e == -1) { + ret = -1; goto cleanup; } + if (e) { + ret = 1; + } } if (e != GIT_ITEROVER) { const git_error *const error = git_error_last(); @@ -1799,9 +1803,13 @@ static int repo_refs_write( while (!(e = git_reference_next(&ref, ref_iter))) { e = repo_refs_tags_each(refs_fd, repo, ref, project_name); git_reference_free(ref); - if (e) { + if (e == -1) { + ret = -1; goto cleanup; } + if (e) { + ret = 1; + } } if (e != GIT_ITEROVER) { const git_error *const error = git_error_last(); |