diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-23 21:26:53 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-23 21:26:53 +0100 |
commit | 52ee0e8e6d187960dfc417f0f506f658caecede9 (patch) | |
tree | a6464e6c4807cc0b2fc88996d493109af5932f55 /src | |
parent | f7fcb18f8a7541bfc0228967fcbd916a9f515638 (diff) | |
download | libgit2-52ee0e8e6d187960dfc417f0f506f658caecede9.tar.gz |
remote: verify there is a push foreach callback set
Diffstat (limited to 'src')
-rw-r--r-- | src/remote.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/remote.c b/src/remote.c index 0b00733dc..531912c64 100644 --- a/src/remote.c +++ b/src/remote.c @@ -2166,7 +2166,8 @@ int git_remote_push(git_remote *remote, git_strarray *refspecs, const git_push_o goto cleanup; } - if ((error = git_push_status_foreach(push, cbs->push_update_reference, cbs->payload)) < 0) + if (cbs->push_update_reference && + (error = git_push_status_foreach(push, cbs->push_update_reference, cbs->payload)) < 0) goto cleanup; error = git_push_update_tips(push, signature, reflog_message); |