From: Matthieu Moy Date: Sun, 20 Sep 2009 17:33:20 +0000 (+0200) Subject: push: Correctly initialize nonfastforward in transport_push. X-Git-Tag: v1.6.5-rc2~10^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bb8cccd01762d26c832b85d3b09798650e294c5f;p=git.git push: Correctly initialize nonfastforward in transport_push. The variable is assigned unconditionally in print_push_status, but print_push_status is not reached by all codepaths. In particular, this fixes a bug where "git push ... nonexisting-branch" was complaining about non-fast forward. Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- diff --git a/transport.c b/transport.c index f231b355f..ce1d25e46 100644 --- a/transport.c +++ b/transport.c @@ -1001,8 +1001,9 @@ int transport_set_option(struct transport *transport, int transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags, - int * nonfastforward) + int *nonfastforward) { + *nonfastforward = 0; verify_remote_names(refspec_nr, refspec); if (transport->push)