git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] shortlog: initialize nongit variable
@ 2008-03-25 14:46 SZEDER Gábor
  2008-03-25 15:39 ` Nguyen Thai Ngoc Duy
  0 siblings, 1 reply; 5+ messages in thread
From: SZEDER Gábor @ 2008-03-25 14:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List, SZEDER Gábor

setup_git_directory_gently() only modifies the value of the nongit
variable if we are not in a git repository, therefore nongit is left
uninitialized if we are in a git repository.  This sometimes broke
shortlog when it was not fed with a log on its standard input.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 builtin-shortlog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index bd795b1..60a6d45 100644
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
@@ -229,7 +229,7 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
 {
 	struct shortlog log;
 	struct rev_info rev;
-	int nongit;
+	int nongit = 0;
 
 	prefix = setup_git_directory_gently(&nongit);
 	shortlog_init(&log);
-- 
1.5.5.rc1

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

end of thread, other threads:[~2008-03-25 21:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-25 14:46 [PATCH] shortlog: initialize nongit variable SZEDER Gábor
2008-03-25 15:39 ` Nguyen Thai Ngoc Duy
2008-03-25 16:03   ` SZEDER Gábor
2008-03-25 19:58     ` Jonas Fonseca
2008-03-25 21:06       ` SZEDER Gábor

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).