[PATCH] shortlog: initialize nongit variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux