summaryrefslogtreecommitdiff
path: root/src/push.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2014-12-10 14:15:15 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2014-12-10 14:15:15 -0500
commit4eb97ef3bf18403fbce351ae4cac673655d2886a (patch)
tree4f83e57f1d80a1aaf175b486052d16e23536fff6 /src/push.c
parentcd305c2f567678c96bccecab69f715b6063089bc (diff)
parent85a6d5f49ca34d1ceb8ec4c4e43c5ce60d321fa3 (diff)
downloadlibgit2-4eb97ef3bf18403fbce351ae4cac673655d2886a.tar.gz
Merge pull request #2756 from libgit2/cmn/push-error-concerns
Fold `git_push_unpack_ok()` into `git_push_finish()`
Diffstat (limited to 'src/push.c')
-rw-r--r--src/push.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/push.c b/src/push.c
index 6671da465..fb51383cb 100644
--- a/src/push.c
+++ b/src/push.c
@@ -632,12 +632,12 @@ int git_push_finish(git_push *push)
(error = do_push(push)) < 0)
return error;
- return 0;
-}
+ if (!push->unpack_ok) {
+ error = -1;
+ giterr_set(GITERR_NET, "unpacking the sent packfile failed on the remote");
+ }
-int git_push_unpack_ok(const git_push *push)
-{
- return push->unpack_ok;
+ return error;
}
int git_push_status_foreach(git_push *push,