Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/shortlog-tolerate-broken-commit' into maint
author
Junio C Hamano
<gitster@pobox.com>
Mon, 28 Oct 2013 17:17:31 +0000
(10:17 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 28 Oct 2013 17:17:31 +0000
(10:17 -0700)
"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
1
2
builtin/shortlog.c
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
compact
(merge:
b28325d
cd4f09e
)
diff --combined
builtin/shortlog.c
index 1434f8fee487751abe069250c611bdaed2fa5857,dca7fa1f91cecacba9e09dff9875260f08a79386..84ffbb798e2e0ec8c1121790c04ccbb58b05e591
---
1
/
builtin/shortlog.c
---
2
/
builtin/shortlog.c
+++ b/
builtin/shortlog.c
@@@
-127,9
-127,11
+127,11
@@@
void shortlog_add_commit(struct shortlo
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;
@@@
-137,7
-139,6
+139,7
@@@
ctx.subject = "";
ctx.after_subject = "";
ctx.date_mode = DATE_NORMAL;
+ ctx.output_encoding = get_log_output_encoding();
pretty_print_commit(&ctx, commit, &ufbuf);
buffer = ufbuf.buf;
} else if (*buffer) {