summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c29d53f)
raw | patch | inline | side by side (parent: c29d53f)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 20 Dec 2009 04:11:12 +0000 (23:11 -0500) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 20 Dec 2009 04:11:12 +0000 (23:11 -0500) |
tig.c | patch | blob | history |
index 81b85e724a57dbae6dfd32d97638c1d696209d6d..c1dd51366a2694bffe61de408c9e3f2c0ce37e61 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2245,7 +2245,7 @@ draw_field(struct view *view, enum line_type type, const char *text, int len, bo
static bool
draw_date(struct view *view, struct time *time)
{
- const char *date = time ? mkdate(time) : "";
+ const char *date = time && time->sec ? mkdate(time) : "";
int cols = opt_date == DATE_SHORT ? DATE_SHORT_COLS : DATE_COLS;
return draw_field(view, LINE_DATE, date, cols, FALSE);
if (opt_author && draw_author(view, entry->author))
return TRUE;
- if (opt_date && draw_date(view, entry->author ? &entry->time : NULL))
+ if (opt_date && draw_date(view, &entry->time))
return TRUE;
}
if (draw_text(view, line->type, entry->name, TRUE))
struct branch *branch = line->data;
enum line_type type = branch->ref->head ? LINE_MAIN_HEAD : LINE_DEFAULT;
- if (opt_date && draw_date(view, branch->author ? &branch->time : NULL))
+ if (opt_date && draw_date(view, &branch->time))
return TRUE;
if (opt_author && draw_author(view, branch->author))