[PATCH] shortlog: initialize nongit variable
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Mar 25, 2008, 14:46 UTC
- Message-ID
- <1206456377-2735-1-git-send-email-szeder@ira.uka.de>
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