]>
Commit | Line | Data |
---|---|---|
b8ec5923 JS |
1 | #include "builtin.h" |
2 | #include "cache.h" | |
b2141fc1 | 3 | #include "config.h" |
b8ec5923 JS |
4 | #include "commit.h" |
5 | #include "diff.h" | |
c455c87c | 6 | #include "string-list.h" |
b8ec5923 | 7 | #include "revision.h" |
3714e7c8 | 8 | #include "utf8.h" |
7c1c6782 | 9 | #include "mailmap.h" |
552bcac3 | 10 | #include "shortlog.h" |
14ec9cbd | 11 | #include "parse-options.h" |
47beb37b | 12 | #include "trailer.h" |
449a9009 | 13 | #include "strmap.h" |
b8ec5923 | 14 | |
14ec9cbd | 15 | static char const * const shortlog_usage[] = { |
cd56d4e5 MÅ |
16 | N_("git shortlog [<options>] [<revision-range>] [[--] <path>...]"), |
17 | N_("git log --pretty=short | git shortlog [<options>]"), | |
14ec9cbd PH |
18 | NULL |
19 | }; | |
b8ec5923 | 20 | |
9b21a34a JK |
21 | /* |
22 | * The util field of our string_list_items will contain one of two things: | |
23 | * | |
24 | * - if --summary is not in use, it will point to a string list of the | |
25 | * oneline subjects assigned to this author | |
26 | * | |
27 | * - if --summary is in use, we don't need that list; we only need to know | |
28 | * its size. So we abuse the pointer slot to store our integer counter. | |
29 | * | |
30 | * This macro accesses the latter. | |
31 | */ | |
32 | #define UTIL_TO_INT(x) ((intptr_t)(x)->util) | |
33 | ||
34 | static int compare_by_counter(const void *a1, const void *a2) | |
35 | { | |
36 | const struct string_list_item *i1 = a1, *i2 = a2; | |
37 | return UTIL_TO_INT(i2) - UTIL_TO_INT(i1); | |
38 | } | |
39 | ||
40 | static int compare_by_list(const void *a1, const void *a2) | |
b8ec5923 | 41 | { |
c455c87c JS |
42 | const struct string_list_item *i1 = a1, *i2 = a2; |
43 | const struct string_list *l1 = i1->util, *l2 = i2->util; | |
b8ec5923 JS |
44 | |
45 | if (l1->nr < l2->nr) | |
6d6ab610 | 46 | return 1; |
b8ec5923 JS |
47 | else if (l1->nr == l2->nr) |
48 | return 0; | |
49 | else | |
6d6ab610 | 50 | return -1; |
b8ec5923 JS |
51 | } |
52 | ||
552bcac3 | 53 | static void insert_one_record(struct shortlog *log, |
45d93eb8 | 54 | const char *ident, |
1e931cb4 | 55 | const char *oneline) |
b8ec5923 | 56 | { |
c455c87c | 57 | struct string_list_item *item; |
1e931cb4 | 58 | |
45d93eb8 | 59 | item = string_list_insert(&log->list, ident); |
b8ec5923 | 60 | |
ed7eba90 | 61 | if (log->summary) |
9b21a34a | 62 | item->util = (void *)(UTIL_TO_INT(item) + 1); |
ed7eba90 | 63 | else { |
4e168333 | 64 | char *buffer; |
ed7eba90 JK |
65 | struct strbuf subject = STRBUF_INIT; |
66 | const char *eol; | |
67 | ||
68 | /* Skip any leading whitespace, including any blank lines. */ | |
69 | while (*oneline && isspace(*oneline)) | |
70 | oneline++; | |
71 | eol = strchr(oneline, '\n'); | |
72 | if (!eol) | |
73 | eol = oneline + strlen(oneline); | |
74 | if (starts_with(oneline, "[PATCH")) { | |
75 | char *eob = strchr(oneline, ']'); | |
76 | if (eob && (!eol || eob < eol)) | |
77 | oneline = eob + 1; | |
78 | } | |
79 | while (*oneline && isspace(*oneline) && *oneline != '\n') | |
80 | oneline++; | |
81 | format_subject(&subject, oneline, " "); | |
82 | buffer = strbuf_detach(&subject, NULL); | |
b8ec5923 | 83 | |
9b21a34a JK |
84 | if (item->util == NULL) |
85 | item->util = xcalloc(1, sizeof(struct string_list)); | |
ed7eba90 JK |
86 | string_list_append(item->util, buffer); |
87 | } | |
b8ec5923 JS |
88 | } |
89 | ||
87abb962 JK |
90 | static int parse_ident(struct shortlog *log, |
91 | struct strbuf *out, const char *in) | |
1ab03a57 JK |
92 | { |
93 | const char *mailbuf, *namebuf; | |
94 | size_t namelen, maillen; | |
95 | struct ident_split ident; | |
96 | ||
97 | if (split_ident_line(&ident, in, strlen(in))) | |
98 | return -1; | |
99 | ||
100 | namebuf = ident.name_begin; | |
101 | mailbuf = ident.mail_begin; | |
102 | namelen = ident.name_end - ident.name_begin; | |
103 | maillen = ident.mail_end - ident.mail_begin; | |
104 | ||
105 | map_user(&log->mailmap, &mailbuf, &maillen, &namebuf, &namelen); | |
106 | strbuf_add(out, namebuf, namelen); | |
107 | if (log->email) | |
108 | strbuf_addf(out, " <%.*s>", (int)maillen, mailbuf); | |
109 | ||
110 | return 0; | |
111 | } | |
112 | ||
552bcac3 | 113 | static void read_from_stdin(struct shortlog *log) |
b8ec5923 | 114 | { |
45d93eb8 JK |
115 | struct strbuf ident = STRBUF_INIT; |
116 | struct strbuf mapped_ident = STRBUF_INIT; | |
50250491 | 117 | struct strbuf oneline = STRBUF_INIT; |
fbfda15f LT |
118 | static const char *author_match[2] = { "Author: ", "author " }; |
119 | static const char *committer_match[2] = { "Commit: ", "committer " }; | |
120 | const char **match; | |
1e931cb4 | 121 | |
63d24fa0 JK |
122 | if (HAS_MULTI_BITS(log->groups)) |
123 | die(_("using multiple --group options with stdin is not supported")); | |
124 | ||
125 | switch (log->groups) { | |
92338c45 JK |
126 | case SHORTLOG_GROUP_AUTHOR: |
127 | match = author_match; | |
128 | break; | |
129 | case SHORTLOG_GROUP_COMMITTER: | |
130 | match = committer_match; | |
131 | break; | |
47beb37b JK |
132 | case SHORTLOG_GROUP_TRAILER: |
133 | die(_("using --group=trailer with stdin is not supported")); | |
92338c45 JK |
134 | default: |
135 | BUG("unhandled shortlog group"); | |
136 | } | |
137 | ||
45d93eb8 | 138 | while (strbuf_getline_lf(&ident, stdin) != EOF) { |
5c3894c3 | 139 | const char *v; |
45d93eb8 JK |
140 | if (!skip_prefix(ident.buf, match[0], &v) && |
141 | !skip_prefix(ident.buf, match[1], &v)) | |
1e931cb4 | 142 | continue; |
a1c5405a | 143 | while (strbuf_getline_lf(&oneline, stdin) != EOF && |
50250491 | 144 | oneline.len) |
1e931cb4 | 145 | ; /* discard headers */ |
a1c5405a | 146 | while (strbuf_getline_lf(&oneline, stdin) != EOF && |
50250491 | 147 | !oneline.len) |
1e931cb4 | 148 | ; /* discard blanks */ |
1ab03a57 | 149 | |
45d93eb8 | 150 | strbuf_reset(&mapped_ident); |
87abb962 | 151 | if (parse_ident(log, &mapped_ident, v) < 0) |
1ab03a57 JK |
152 | continue; |
153 | ||
45d93eb8 | 154 | insert_one_record(log, mapped_ident.buf, oneline.buf); |
b8ec5923 | 155 | } |
45d93eb8 JK |
156 | strbuf_release(&ident); |
157 | strbuf_release(&mapped_ident); | |
50250491 | 158 | strbuf_release(&oneline); |
b8ec5923 JS |
159 | } |
160 | ||
47beb37b | 161 | static void insert_records_from_trailers(struct shortlog *log, |
63d24fa0 | 162 | struct strset *dups, |
47beb37b JK |
163 | struct commit *commit, |
164 | struct pretty_print_context *ctx, | |
165 | const char *oneline) | |
166 | { | |
167 | struct trailer_iterator iter; | |
168 | const char *commit_buffer, *body; | |
56d5dde7 | 169 | struct strbuf ident = STRBUF_INIT; |
47beb37b JK |
170 | |
171 | /* | |
172 | * Using format_commit_message("%B") would be simpler here, but | |
173 | * this saves us copying the message. | |
174 | */ | |
175 | commit_buffer = logmsg_reencode(commit, NULL, ctx->output_encoding); | |
176 | body = strstr(commit_buffer, "\n\n"); | |
177 | if (!body) | |
178 | return; | |
179 | ||
180 | trailer_iterator_init(&iter, body); | |
181 | while (trailer_iterator_advance(&iter)) { | |
182 | const char *value = iter.val.buf; | |
183 | ||
63d24fa0 | 184 | if (!string_list_has_string(&log->trailers, iter.key.buf)) |
47beb37b JK |
185 | continue; |
186 | ||
56d5dde7 JK |
187 | strbuf_reset(&ident); |
188 | if (!parse_ident(log, &ident, value)) | |
189 | value = ident.buf; | |
190 | ||
449a9009 | 191 | if (!strset_add(dups, value)) |
f17b0b99 | 192 | continue; |
47beb37b JK |
193 | insert_one_record(log, value, oneline); |
194 | } | |
195 | trailer_iterator_release(&iter); | |
196 | ||
56d5dde7 | 197 | strbuf_release(&ident); |
47beb37b JK |
198 | unuse_commit_buffer(commit, commit_buffer); |
199 | } | |
200 | ||
552bcac3 | 201 | void shortlog_add_commit(struct shortlog *log, struct commit *commit) |
b8ec5923 | 202 | { |
45d93eb8 | 203 | struct strbuf ident = STRBUF_INIT; |
2db6b83d | 204 | struct strbuf oneline = STRBUF_INIT; |
63d24fa0 | 205 | struct strset dups = STRSET_INIT; |
2db6b83d | 206 | struct pretty_print_context ctx = {0}; |
92338c45 | 207 | const char *oneline_str; |
2db6b83d JK |
208 | |
209 | ctx.fmt = CMIT_FMT_USERFORMAT; | |
210 | ctx.abbrev = log->abbrev; | |
6d167fd7 | 211 | ctx.print_email_subject = 1; |
2db6b83d JK |
212 | ctx.date_mode.type = DATE_NORMAL; |
213 | ctx.output_encoding = get_log_output_encoding(); | |
214 | ||
4e1d1a2e JK |
215 | if (!log->summary) { |
216 | if (log->user_format) | |
217 | pretty_print_commit(&ctx, commit, &oneline); | |
552bcac3 | 218 | else |
4e1d1a2e | 219 | format_commit_message(commit, "%s", &oneline, &ctx); |
cd4f09e3 | 220 | } |
92338c45 JK |
221 | oneline_str = oneline.len ? oneline.buf : "<none>"; |
222 | ||
63d24fa0 JK |
223 | if (log->groups & SHORTLOG_GROUP_AUTHOR) { |
224 | strbuf_reset(&ident); | |
92338c45 JK |
225 | format_commit_message(commit, |
226 | log->email ? "%aN <%aE>" : "%aN", | |
227 | &ident, &ctx); | |
63d24fa0 | 228 | if (!HAS_MULTI_BITS(log->groups) || |
449a9009 | 229 | strset_add(&dups, ident.buf)) |
63d24fa0 JK |
230 | insert_one_record(log, ident.buf, oneline_str); |
231 | } | |
232 | if (log->groups & SHORTLOG_GROUP_COMMITTER) { | |
233 | strbuf_reset(&ident); | |
92338c45 JK |
234 | format_commit_message(commit, |
235 | log->email ? "%cN <%cE>" : "%cN", | |
236 | &ident, &ctx); | |
63d24fa0 | 237 | if (!HAS_MULTI_BITS(log->groups) || |
449a9009 | 238 | strset_add(&dups, ident.buf)) |
63d24fa0 JK |
239 | insert_one_record(log, ident.buf, oneline_str); |
240 | } | |
241 | if (log->groups & SHORTLOG_GROUP_TRAILER) { | |
242 | insert_records_from_trailers(log, &dups, commit, &ctx, oneline_str); | |
92338c45 | 243 | } |
2db6b83d | 244 | |
63d24fa0 | 245 | strset_clear(&dups); |
45d93eb8 | 246 | strbuf_release(&ident); |
2db6b83d | 247 | strbuf_release(&oneline); |
552bcac3 DB |
248 | } |
249 | ||
250 | static void get_from_rev(struct rev_info *rev, struct shortlog *log) | |
251 | { | |
252 | struct commit *commit; | |
253 | ||
254 | if (prepare_revision_walk(rev)) | |
ab8b53bb | 255 | die(_("revision walk setup failed")); |
552bcac3 DB |
256 | while ((commit = get_revision(rev)) != NULL) |
257 | shortlog_add_commit(log, commit); | |
b8ec5923 JS |
258 | } |
259 | ||
14ec9cbd | 260 | static int parse_uint(char const **arg, int comma, int defval) |
3d711d97 JH |
261 | { |
262 | unsigned long ul; | |
263 | int ret; | |
264 | char *endp; | |
265 | ||
266 | ul = strtoul(*arg, &endp, 10); | |
14ec9cbd | 267 | if (*endp && *endp != comma) |
3d711d97 | 268 | return -1; |
14ec9cbd | 269 | if (ul > INT_MAX) |
3d711d97 | 270 | return -1; |
14ec9cbd PH |
271 | ret = *arg == endp ? defval : (int)ul; |
272 | *arg = *endp ? endp + 1 : endp; | |
3d711d97 JH |
273 | return ret; |
274 | } | |
275 | ||
276 | static const char wrap_arg_usage[] = "-w[<width>[,<indent1>[,<indent2>]]]"; | |
277 | #define DEFAULT_WRAPLEN 76 | |
278 | #define DEFAULT_INDENT1 6 | |
279 | #define DEFAULT_INDENT2 9 | |
280 | ||
14ec9cbd | 281 | static int parse_wrap_args(const struct option *opt, const char *arg, int unset) |
3d711d97 | 282 | { |
14ec9cbd PH |
283 | struct shortlog *log = opt->value; |
284 | ||
285 | log->wrap_lines = !unset; | |
286 | if (unset) | |
287 | return 0; | |
288 | if (!arg) { | |
289 | log->wrap = DEFAULT_WRAPLEN; | |
290 | log->in1 = DEFAULT_INDENT1; | |
291 | log->in2 = DEFAULT_INDENT2; | |
292 | return 0; | |
293 | } | |
294 | ||
295 | log->wrap = parse_uint(&arg, ',', DEFAULT_WRAPLEN); | |
296 | log->in1 = parse_uint(&arg, ',', DEFAULT_INDENT1); | |
297 | log->in2 = parse_uint(&arg, '\0', DEFAULT_INDENT2); | |
298 | if (log->wrap < 0 || log->in1 < 0 || log->in2 < 0) | |
299 | return error(wrap_arg_usage); | |
300 | if (log->wrap && | |
301 | ((log->in1 && log->wrap <= log->in1) || | |
302 | (log->in2 && log->wrap <= log->in2))) | |
303 | return error(wrap_arg_usage); | |
304 | return 0; | |
3d711d97 JH |
305 | } |
306 | ||
92338c45 JK |
307 | static int parse_group_option(const struct option *opt, const char *arg, int unset) |
308 | { | |
309 | struct shortlog *log = opt->value; | |
47beb37b | 310 | const char *field; |
92338c45 | 311 | |
63d24fa0 JK |
312 | if (unset) { |
313 | log->groups = 0; | |
314 | string_list_clear(&log->trailers, 0); | |
315 | } else if (!strcasecmp(arg, "author")) | |
316 | log->groups |= SHORTLOG_GROUP_AUTHOR; | |
92338c45 | 317 | else if (!strcasecmp(arg, "committer")) |
63d24fa0 | 318 | log->groups |= SHORTLOG_GROUP_COMMITTER; |
47beb37b | 319 | else if (skip_prefix(arg, "trailer:", &field)) { |
63d24fa0 JK |
320 | log->groups |= SHORTLOG_GROUP_TRAILER; |
321 | string_list_append(&log->trailers, field); | |
47beb37b | 322 | } else |
92338c45 JK |
323 | return error(_("unknown group type: %s"), arg); |
324 | ||
325 | return 0; | |
326 | } | |
327 | ||
328 | ||
552bcac3 DB |
329 | void shortlog_init(struct shortlog *log) |
330 | { | |
331 | memset(log, 0, sizeof(*log)); | |
332 | ||
4e168333 | 333 | read_mailmap(&log->mailmap); |
552bcac3 | 334 | |
c455c87c | 335 | log->list.strdup_strings = 1; |
552bcac3 DB |
336 | log->wrap = DEFAULT_WRAPLEN; |
337 | log->in1 = DEFAULT_INDENT1; | |
338 | log->in2 = DEFAULT_INDENT2; | |
63d24fa0 JK |
339 | log->trailers.strdup_strings = 1; |
340 | log->trailers.cmp = strcasecmp; | |
552bcac3 DB |
341 | } |
342 | ||
b8ec5923 JS |
343 | int cmd_shortlog(int argc, const char **argv, const char *prefix) |
344 | { | |
64093fc0 JK |
345 | struct shortlog log = { STRING_LIST_INIT_NODUP }; |
346 | struct rev_info rev; | |
773b69bf | 347 | int nongit = !startup_info->have_repository; |
552bcac3 | 348 | |
64093fc0 | 349 | const struct option options[] = { |
63d24fa0 | 350 | OPT_BIT('c', "committer", &log.groups, |
e73fe3dd | 351 | N_("group by committer rather than author"), |
63d24fa0 | 352 | SHORTLOG_GROUP_COMMITTER), |
d5d09d47 SB |
353 | OPT_BOOL('n', "numbered", &log.sort_by_number, |
354 | N_("sort output according to the number of commits per author")), | |
355 | OPT_BOOL('s', "summary", &log.summary, | |
e73fe3dd | 356 | N_("suppress commit descriptions, only provides commit count")), |
d5d09d47 | 357 | OPT_BOOL('e', "email", &log.email, |
e73fe3dd | 358 | N_("show the email address of each author")), |
203c8533 | 359 | OPT_CALLBACK_F('w', NULL, &log, N_("<w>[,<i1>[,<i2>]]"), |
e73fe3dd | 360 | N_("linewrap output"), PARSE_OPT_OPTARG, |
203c8533 | 361 | &parse_wrap_args), |
92338c45 | 362 | OPT_CALLBACK(0, "group", &log, N_("field"), |
e73fe3dd | 363 | N_("group by field"), parse_group_option), |
14ec9cbd PH |
364 | OPT_END(), |
365 | }; | |
366 | ||
367 | struct parse_opt_ctx_t ctx; | |
368 | ||
d551a488 | 369 | git_config(git_default_config, NULL); |
552bcac3 | 370 | shortlog_init(&log); |
2abf3503 | 371 | repo_init_revisions(the_repository, &rev, prefix); |
9ca1169f SB |
372 | parse_options_start(&ctx, argc, argv, prefix, options, |
373 | PARSE_OPT_KEEP_DASHDASH | PARSE_OPT_KEEP_ARGV0); | |
14ec9cbd PH |
374 | |
375 | for (;;) { | |
14ec9cbd PH |
376 | switch (parse_options_step(&ctx, options, shortlog_usage)) { |
377 | case PARSE_OPT_HELP: | |
3bb0923f | 378 | case PARSE_OPT_ERROR: |
14ec9cbd | 379 | exit(129); |
a92ec7ef NTND |
380 | case PARSE_OPT_COMPLETE: |
381 | exit(0); | |
14ec9cbd PH |
382 | case PARSE_OPT_DONE: |
383 | goto parse_done; | |
3d711d97 | 384 | } |
6b61ec05 | 385 | parse_revision_opt(&rev, &ctx, options, shortlog_usage); |
14ec9cbd PH |
386 | } |
387 | parse_done: | |
388 | argc = parse_options_end(&ctx); | |
389 | ||
4aa0161e MÅ |
390 | if (nongit && argc > 1) { |
391 | error(_("too many arguments given outside repository")); | |
392 | usage_with_options(shortlog_usage, options); | |
393 | } | |
394 | ||
14ec9cbd | 395 | if (setup_revisions(argc, argv, &rev, NULL) != 1) { |
ab8b53bb | 396 | error(_("unrecognized argument: %s"), argv[1]); |
14ec9cbd | 397 | usage_with_options(shortlog_usage, options); |
b8ec5923 JS |
398 | } |
399 | ||
b526f8ed | 400 | log.user_format = rev.commit_format == CMIT_FMT_USERFORMAT; |
c1977021 | 401 | log.abbrev = rev.abbrev; |
7f7d712b | 402 | log.file = rev.diffopt.file; |
b526f8ed | 403 | |
63d24fa0 JK |
404 | if (!log.groups) |
405 | log.groups = SHORTLOG_GROUP_AUTHOR; | |
406 | string_list_sort(&log.trailers); | |
407 | ||
3384a2df | 408 | /* assume HEAD if from a tty */ |
abe549e1 | 409 | if (!nongit && !rev.pending.nr && isatty(0)) |
3384a2df | 410 | add_head_to_pending(&rev); |
0497c620 | 411 | if (rev.pending.nr == 0) { |
37314495 | 412 | if (isatty(0)) |
ab8b53bb | 413 | fprintf(stderr, _("(reading log message from standard input)\n")); |
552bcac3 | 414 | read_from_stdin(&log); |
0497c620 | 415 | } |
b8ec5923 | 416 | else |
552bcac3 | 417 | get_from_rev(&rev, &log); |
b8ec5923 | 418 | |
552bcac3 | 419 | shortlog_output(&log); |
7f7d712b JS |
420 | if (log.file != stdout) |
421 | fclose(log.file); | |
552bcac3 DB |
422 | return 0; |
423 | } | |
b8ec5923 | 424 | |
bb96a2c9 RS |
425 | static void add_wrapped_shortlog_msg(struct strbuf *sb, const char *s, |
426 | const struct shortlog *log) | |
427 | { | |
5b597082 SP |
428 | strbuf_add_wrapped_text(sb, s, log->in1, log->in2, log->wrap); |
429 | strbuf_addch(sb, '\n'); | |
bb96a2c9 RS |
430 | } |
431 | ||
552bcac3 DB |
432 | void shortlog_output(struct shortlog *log) |
433 | { | |
434 | int i, j; | |
bb96a2c9 RS |
435 | struct strbuf sb = STRBUF_INIT; |
436 | ||
552bcac3 | 437 | if (log->sort_by_number) |
1b5294de | 438 | QSORT(log->list.items, log->list.nr, |
9b21a34a | 439 | log->summary ? compare_by_counter : compare_by_list); |
552bcac3 | 440 | for (i = 0; i < log->list.nr; i++) { |
9b21a34a | 441 | const struct string_list_item *item = &log->list.items[i]; |
552bcac3 | 442 | if (log->summary) { |
0a7b3577 JS |
443 | fprintf(log->file, "%6d\t%s\n", |
444 | (int)UTIL_TO_INT(item), item->string); | |
ac60c94d | 445 | } else { |
9b21a34a | 446 | struct string_list *onelines = item->util; |
0a7b3577 JS |
447 | fprintf(log->file, "%s (%d):\n", |
448 | item->string, onelines->nr); | |
3714e7c8 | 449 | for (j = onelines->nr - 1; j >= 0; j--) { |
c455c87c | 450 | const char *msg = onelines->items[j].string; |
3d711d97 | 451 | |
552bcac3 | 452 | if (log->wrap_lines) { |
bb96a2c9 RS |
453 | strbuf_reset(&sb); |
454 | add_wrapped_shortlog_msg(&sb, msg, log); | |
0a7b3577 | 455 | fwrite(sb.buf, sb.len, 1, log->file); |
3d711d97 JH |
456 | } |
457 | else | |
0a7b3577 | 458 | fprintf(log->file, " %s\n", msg); |
3714e7c8 | 459 | } |
0a7b3577 | 460 | putc('\n', log->file); |
9b21a34a JK |
461 | onelines->strdup_strings = 1; |
462 | string_list_clear(onelines, 0); | |
463 | free(onelines); | |
b8ec5923 JS |
464 | } |
465 | ||
552bcac3 | 466 | log->list.items[i].util = NULL; |
b8ec5923 JS |
467 | } |
468 | ||
bb96a2c9 | 469 | strbuf_release(&sb); |
c455c87c JS |
470 | log->list.strdup_strings = 1; |
471 | string_list_clear(&log->list, 1); | |
d20d654f | 472 | clear_mailmap(&log->mailmap); |
b8ec5923 | 473 | } |