summaryrefslogtreecommitdiff
path: root/builtin/shortlog.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-10-28 10:17:31 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-10-28 10:17:31 -0700
commit77bc4302dc93ac33891c72df59d9426eb6d06d0b (patch)
tree84362fb631bfb7c4e1b93d8bd0a26d7319827c8d /builtin/shortlog.c
parentMerge branch 'jk/diff-algo' into maint (diff)
parentshortlog: ignore commits with missing authors (diff)
downloadtgif-77bc4302dc93ac33891c72df59d9426eb6d06d0b.tar.xz
Merge branch 'jk/shortlog-tolerate-broken-commit' into maint
"git shortlog" used to choke and die when there is a malformed commit (e.g. missing authors); it now simply ignore such a commit and keeps going. * jk/shortlog-tolerate-broken-commit: shortlog: ignore commits with missing authors
Diffstat (limited to 'builtin/shortlog.c')
-rw-r--r--builtin/shortlog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 1434f8fee4..84ffbb798e 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -127,9 +127,11 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
author = buffer + 7;
buffer = eol;
}
- if (!author)
- die(_("Missing author: %s"),
+ if (!author) {
+ warning(_("Missing author: %s"),
sha1_to_hex(commit->object.sha1));
+ return;
+ }
if (log->user_format) {
struct pretty_print_context ctx = {0};
ctx.fmt = CMIT_FMT_USERFORMAT;