summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 994bb6e)
raw | patch | inline | side by side (parent: 994bb6e)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 21 Feb 2009 00:15:05 +0000 (01:15 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 21 Feb 2009 00:16:20 +0000 (01:16 +0100) |
tig.c | patch | blob | history |
index 9349f697f5b72b7b112ba6c6e28296862ea77f95..13d1c45038042edbd391230f9f0b53b69cae65fd 100644 (file)
--- a/tig.c
+++ b/tig.c
struct branch *branch = line->data;
enum line_type type = branch->ref->head ? LINE_MAIN_HEAD : LINE_DEFAULT;
- if (opt_date && draw_date(view, &branch->time))
+ if (opt_date && draw_date(view, branch->author ? &branch->time : NULL))
return TRUE;
if (opt_author && draw_author(view, branch->author))
branch_read(struct view *view, char *line)
{
static char id[SIZEOF_REV];
+ struct branch *reference;
size_t i;
if (!line)
return TRUE;
case LINE_AUTHOR:
- for (i = 0; i < view->lines; i++) {
+ for (i = 0, reference = NULL; i < view->lines; i++) {
struct branch *branch = view->line[i].data;
if (strcmp(branch->ref->id, id))
continue;
+ view->line[i].dirty = TRUE;
+ if (reference) {
+ branch->author = reference->author;
+ branch->time = reference->time;
+ continue;
+ }
+
parse_author_line(line + STRING_SIZE("author "),
&branch->author, &branch->time);
- view->line[i].dirty = TRUE;
+ reference = branch;
}
return TRUE;