~mdw
/
tig
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve handling of 'bogus' author lines
[tig]
/
tig.c
diff --git
a/tig.c
b/tig.c
index
6a1f3d1
..
f110dae
100644
(file)
--- a/
tig.c
+++ b/
tig.c
@@
-2286,10
+2286,22
@@
main_read(struct view *view, char *line)
break;
if (end) {
break;
if (end) {
+ char *email = end + 1;
+
for (; end > ident && isspace(end[-1]); end--) ;
for (; end > ident && isspace(end[-1]); end--) ;
+
+ if (end == ident && *email) {
+ ident = email;
+ end = strchr(ident, '>');
+ for (; end > ident && isspace(end[-1]); end--) ;
+ }
*end = 0;
}
*end = 0;
}
+ /* End is NULL or ident meaning there's no author. */
+ if (end <= ident)
+ ident = "Unknown";
+
string_copy(commit->author, ident);
/* Parse epoch and timezone */
string_copy(commit->author, ident);
/* Parse epoch and timezone */