git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [(resend) PATCH] push: Correctly initialize nonfastforward in transport_push.
@ 2009-09-20 17:33 Matthieu Moy
  0 siblings, 0 replies; only message in thread
From: Matthieu Moy @ 2009-09-20 17:33 UTC (permalink / raw)
  To: git, gitster; +Cc: Matthieu Moy

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>
---
Just making sure the patch hasn't been forgotten ... (and changed the
subject from do_push to transport_push)

Regards,

 transport.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/transport.c b/transport.c
index 4cb8077..18db3d3 100644
--- a/transport.c
+++ b/transport.c
@@ -871,6 +871,7 @@ int transport_push(struct transport *transport,
 		   int refspec_nr, const char **refspec, int flags,
 		   int * nonfastforward)
 {
+	*nonfastforward = 0;
 	verify_remote_names(refspec_nr, refspec);
 
 	if (transport->push)
-- 
1.6.5.rc1.11.g2d184.dirty

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-20 17:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-20 17:33 [(resend) PATCH] push: Correctly initialize nonfastforward in transport_push Matthieu Moy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).