From: Jonas Fonseca Date: Sun, 25 Mar 2007 09:10:14 +0000 (+0200) Subject: Merge with master X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=71b01db299cae08ae7451659ef31e0abcf799358;p=tig.git Merge with master --- 71b01db299cae08ae7451659ef31e0abcf799358 diff --cc Makefile index 9d8c57b,9d8c57b..0052abd --- a/Makefile +++ b/Makefile @@@ -4,7 -4,7 +4,7 @@@ mandir = $(prefix)/ma docdir = $(prefix)/share/doc # DESTDIR= --LDLIBS = -lcurses ++LDLIBS = -lcurses -liconv CFLAGS = -Wall -O2 DFLAGS = -g -DDEBUG -Werror PROGS = tig diff --cc tig.c index 1983375,affbcec..8deab13 --- a/tig.c +++ b/tig.c @@@ -3044,32 -2827,24 +3048,27 @@@ main_read(struct view *view, char *line case LINE_AUTHOR: { + /* Parse author lines where the name may be empty: + * author 1138474660 +0100 + */ char *ident = line + STRING_SIZE("author "); - char *end = strchr(ident, '<'); + char *nameend = strchr(ident, '<'); + char *emailend = strchr(ident, '>'); - if (!commit) + if (!commit || !nameend || !emailend) break; + update_rev_graph(graph); + graph = graph->next; + - if (end) { - char *email = end + 1; - - 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; + *nameend = *emailend = 0; + ident = chomp_string(ident); + if (!*ident) { + ident = chomp_string(nameend + 1); + if (!*ident) + ident = "Unknown"; } - /* End is NULL or ident meaning there's no author. */ - if (end <= ident) - ident = "Unknown"; - string_copy(commit->author, ident); /* Parse epoch and timezone */