git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] push: Correctly initialize nonfastforward in do_push.
@ 2009-09-16 16:37 Matthieu Moy
  2009-09-16 17:13 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Matthieu Moy @ 2009-09-16 16:37 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>
---
(I'm the one to blame, sorry for introducing this bug)

 builtin-push.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-push.c b/builtin-push.c
index 3cb1ee4..a73333b 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -140,7 +140,7 @@ static int do_push(const char *repo, int flags)
 		struct transport *transport =
 			transport_get(remote, url[i]);
 		int err;
-		int nonfastforward;
+		int nonfastforward = 0;
 		if (receivepack)
 			transport_set_option(transport,
 					     TRANS_OPT_RECEIVEPACK, receivepack);
-- 
1.6.5.rc1.11.g2d184.dirty

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-16 18:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-16 16:37 [PATCH] push: Correctly initialize nonfastforward in do_push Matthieu Moy
2009-09-16 17:13 ` Junio C Hamano
2009-09-16 17:26   ` Matthieu Moy
2009-09-16 17:28     ` [PATCH v2] " Matthieu Moy
2009-09-16 18:15     ` [PATCH] " Junio C Hamano
2009-09-16 18:29       ` 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).