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 <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
cb572206d9
commit
bb8cccd017
|
@ -1003,6 +1003,7 @@ int transport_push(struct transport *transport,
|
||||||
int refspec_nr, const char **refspec, int flags,
|
int refspec_nr, const char **refspec, int flags,
|
||||||
int *nonfastforward)
|
int *nonfastforward)
|
||||||
{
|
{
|
||||||
|
*nonfastforward = 0;
|
||||||
verify_remote_names(refspec_nr, refspec);
|
verify_remote_names(refspec_nr, refspec);
|
||||||
|
|
||||||
if (transport->push)
|
if (transport->push)
|
||||||
|
|
Loading…
Reference in New Issue