-rw-r--r-- | ui-summary.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ui-summary.c b/ui-summary.c index 04a466a..ba90510 100644 --- a/ui-summary.c +++ b/ui-summary.c | |||
@@ -37,53 +37,59 @@ static int cmp_branch_age(const void *a, const void *b) | |||
37 | struct refinfo *r1 = *(struct refinfo **)a; | 37 | struct refinfo *r1 = *(struct refinfo **)a; |
38 | struct refinfo *r2 = *(struct refinfo **)b; | 38 | struct refinfo *r2 = *(struct refinfo **)b; |
39 | 39 | ||
40 | return cmp_age(r1->commit->committer_date, r2->commit->committer_date); | 40 | return cmp_age(r1->commit->committer_date, r2->commit->committer_date); |
41 | } | 41 | } |
42 | 42 | ||
43 | static int cmp_tag_age(const void *a, const void *b) | 43 | static int cmp_tag_age(const void *a, const void *b) |
44 | { | 44 | { |
45 | struct refinfo *r1 = *(struct refinfo **)a; | 45 | struct refinfo *r1 = *(struct refinfo **)a; |
46 | struct refinfo *r2 = *(struct refinfo **)b; | 46 | struct refinfo *r2 = *(struct refinfo **)b; |
47 | 47 | ||
48 | return cmp_age(r1->tag->tagger_date, r2->tag->tagger_date); | 48 | return cmp_age(r1->tag->tagger_date, r2->tag->tagger_date); |
49 | } | 49 | } |
50 | 50 | ||
51 | static int print_branch(struct refinfo *ref) | 51 | static int print_branch(struct refinfo *ref) |
52 | { | 52 | { |
53 | struct commitinfo *info = ref->commit; | 53 | struct commitinfo *info = ref->commit; |
54 | char *name = (char *)ref->refname; | 54 | char *name = (char *)ref->refname; |
55 | 55 | ||
56 | if (!info) | 56 | if (!info) |
57 | return 1; | 57 | return 1; |
58 | html("<tr><td>"); | 58 | html("<tr><td>"); |
59 | cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0); | 59 | cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0); |
60 | html("</td><td>"); | 60 | html("</td><td>"); |
61 | cgit_print_age(info->commit->date, -1, NULL); | 61 | |
62 | html("</td><td>"); | 62 | if (ref->object->type == OBJ_COMMIT) { |
63 | html_txt(info->author); | 63 | cgit_print_age(info->commit->date, -1, NULL); |
64 | html("</td><td>"); | 64 | html("</td><td>"); |
65 | cgit_commit_link(info->subject, NULL, NULL, name, NULL); | 65 | html_txt(info->author); |
66 | html("</td><td>"); | ||
67 | cgit_commit_link(info->subject, NULL, NULL, name, NULL); | ||
68 | } else { | ||
69 | html("</td><td></td><td>"); | ||
70 | cgit_object_link(ref->object); | ||
71 | } | ||
66 | html("</td></tr>\n"); | 72 | html("</td></tr>\n"); |
67 | return 0; | 73 | return 0; |
68 | } | 74 | } |
69 | 75 | ||
70 | static void print_tag_header() | 76 | static void print_tag_header() |
71 | { | 77 | { |
72 | html("<tr class='nohover'><th class='left'>Tag</th>" | 78 | html("<tr class='nohover'><th class='left'>Tag</th>" |
73 | "<th class='left'>Age</th>" | 79 | "<th class='left'>Age</th>" |
74 | "<th class='left'>Author</th>" | 80 | "<th class='left'>Author</th>" |
75 | "<th class='left'>Reference</th></tr>\n"); | 81 | "<th class='left'>Reference</th></tr>\n"); |
76 | header = 1; | 82 | header = 1; |
77 | } | 83 | } |
78 | 84 | ||
79 | static int print_tag(struct refinfo *ref) | 85 | static int print_tag(struct refinfo *ref) |
80 | { | 86 | { |
81 | struct tag *tag; | 87 | struct tag *tag; |
82 | struct taginfo *info; | 88 | struct taginfo *info; |
83 | char *url, *name = (char *)ref->refname; | 89 | char *url, *name = (char *)ref->refname; |
84 | 90 | ||
85 | if (ref->object->type == OBJ_TAG) { | 91 | if (ref->object->type == OBJ_TAG) { |
86 | tag = (struct tag *)ref->object; | 92 | tag = (struct tag *)ref->object; |
87 | info = ref->tag; | 93 | info = ref->tag; |
88 | if (!tag || !info) | 94 | if (!tag || !info) |
89 | return 1; | 95 | return 1; |