X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fshortlog.c;h=2135b0dde11faa0c501682ed074e0ba96bf28b42;hb=78bce6c7e93f4c8797da06cf93f59b7ac8e84ec0;hp=0a9681ba7ece52e751b1b54d53f3e8fb4c19464e;hpb=2a16315031cf478601ea150f7861d4f86b1350a2;p=git.git diff --git a/builtin/shortlog.c b/builtin/shortlog.c index 0a9681ba7..2135b0dde 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -249,7 +249,7 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix) { static struct shortlog log; static struct rev_info rev; - int nongit; + int nongit = !startup_info->have_repository; static const struct option options[] = { OPT_BOOLEAN('n', "numbered", &log.sort_by_number, @@ -265,7 +265,6 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix) struct parse_opt_ctx_t ctx; - prefix = setup_git_directory_gently(&nongit); git_config(git_default_config, NULL); shortlog_init(&log); init_revisions(&rev, prefix);