From ee28de65a0090f0d645acde7ee57f32b48a086a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20H=C3=B6lzl?= <robert.hoelzl@posteo.de>
Date: Sun, 23 Oct 2016 23:55:53 +0200
Subject: [PATCH] Extend comment of Remote.push by note about
 push_update_reference.

As happened in support request https://github.com/libgit2/libgit2/issues/3963 it can be easily overseen,
that push returns True, when the remote has installed a hook that denies the commits.
---
 pygit2/remote.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pygit2/remote.py b/pygit2/remote.py
index 2ac9316..4ccf6ff 100644
--- a/pygit2/remote.py
+++ b/pygit2/remote.py
@@ -413,6 +413,12 @@ class Remote(object):
         """Push the given refspec to the remote. Raises ``GitError`` on
         protocol error or unpack failure.
 
+        When the remote has a githook installed, that denies the reference
+        this function will return successfully. Thus it is stronly recommended
+        to install a callback, that implements
+        :py:meth:`RemoteCallbacks.push_update_reference` and check the passed
+        parameters for successfull operations.
+
         :param [str] specs: push refspecs to use
         """
         push_opts = ffi.new('git_push_options *')