summaryrefslogtreecommitdiff
path: root/builtin/shortlog.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-06-13 17:37:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-13 17:37:48 (GMT)
commit7013220d2b3181d4ae55e21e0f18b9abfd6e011d (patch)
tree4ceb8a1c5dd10047c7d9b59a30e9687cc7fc8372 /builtin/shortlog.c
parente059388fb200fb2b5281ce211242ef3525a9c2c7 (diff)
parent64093fc06a871f71316211a2aea6bb46c49b20ab (diff)
downloadgit-7013220d2b3181d4ae55e21e0f18b9abfd6e011d.zip
git-7013220d2b3181d4ae55e21e0f18b9abfd6e011d.tar.gz
git-7013220d2b3181d4ae55e21e0f18b9abfd6e011d.tar.bz2
Merge branch 'jk/parseopt-string-list' into jk/string-list-static-init
* jk/parseopt-string-list: blame,shortlog: don't make local option variables static interpret-trailers: don't duplicate option strings parse_opt_string_list: stop allocating new strings
Diffstat (limited to 'builtin/shortlog.c')
-rw-r--r--builtin/shortlog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index bfc082e..f83984e 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -233,11 +233,11 @@ void shortlog_init(struct shortlog *log)
int cmd_shortlog(int argc, const char **argv, const char *prefix)
{
- static struct shortlog log;
- static struct rev_info rev;
+ struct shortlog log = { STRING_LIST_INIT_NODUP };
+ struct rev_info rev;
int nongit = !startup_info->have_repository;
- static const struct option options[] = {
+ const struct option options[] = {
OPT_BOOL('n', "numbered", &log.sort_by_number,
N_("sort output according to the number of commits per author")),
OPT_BOOL('s', "summary", &log.summary,