diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 0a9681ba7ece52e751b1b54d53f3e8fb4c19464e..2135b0dde11faa0c501682ed074e0ba96bf28b42 100644 (file)
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
{
static struct shortlog log;
static struct rev_info rev;
{
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,
static const struct option options[] = {
OPT_BOOLEAN('n', "numbered", &log.sort_by_number,
struct parse_opt_ctx_t ctx;
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);
git_config(git_default_config, NULL);
shortlog_init(&log);
init_revisions(&rev, prefix);