diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Clean up the whole tree
Diffstat (limited to '')
-rw-r--r--source/ui-tag.c25
1 file changed, 8 insertions, 17 deletions
diff --git a/source/ui-tag.c b/source/ui-tag.c
index 469f209..ec8cd54 100644
--- a/source/ui-tag.c
+++ b/source/ui-tag.c
@@ -55,17 +55,14 @@ static void print_message(char *msg)
}
}
-static void print_annotated_tag(const char *revname,
- const struct object_id *oid)
+static void print_annotated_tag(const char *revname, const struct object_id *oid)
{
struct tag *tag;
struct taginfo *info;
tag = lookup_tag(the_repository, oid);
- if (!tag || parse_tag(the_repository, tag) ||
- !(info = cgit_parse_tag(tag))) {
- cgit_print_error_page(500, "Internal Server Error",
- "Bad tag object: %s", revname);
+ if (!tag || parse_tag(the_repository, tag) || !(info = cgit_parse_tag(tag))) {
+ cgit_print_error_page(500, "Internal Server Error", "Bad tag object: %s", revname);
return;
}
@@ -76,20 +73,16 @@ static void print_annotated_tag(const char *revname,
htmlf(" (<span class='oid'>%s</span>)</td></tr>\n", oid_to_hex(oid));
if (info->tagger_date > 0) {
html("<tr><th>tag date</th><td><time datetime='");
- html_attr(show_date(info->tagger_date, info->tagger_tz,
- cgit_date_mode(DATE_ISO8601_STRICT)));
+ html_attr(show_date(info->tagger_date, info->tagger_tz, cgit_date_mode(DATE_ISO8601_STRICT)));
html("'>");
- html_txt(show_date(info->tagger_date, info->tagger_tz,
- cgit_date_mode(DATE_ISO8601)));
+ html_txt(show_date(info->tagger_date, info->tagger_tz, cgit_date_mode(DATE_ISO8601)));
html("</time></td></tr>\n");
}
if (info->tagger) {
html("<tr><th>tagged by</th><td>");
// A tag can carry a tagger with no address, and a filter must
// not be handed a NULL argument.
- cgit_open_filter(ctx.repo->email_filter,
- info->tagger_email ? info->tagger_email : "",
- "tag");
+ cgit_open_filter(ctx.repo->email_filter, info->tagger_email ? info->tagger_email : "", "tag");
html_txt(info->tagger);
if (info->tagger_email && ctx.cfg.enable_plain_email) {
html(" ");
@@ -132,14 +125,12 @@ void cgit_print_tag(char *revname)
strbuf_addf(&fullref, "refs/tags/%s", revname);
if (repo_get_oid(the_repository, fullref.buf, &oid)) {
- cgit_print_error_page(404, "Not Found",
- "Bad tag reference: %s", revname);
+ cgit_print_error_page(404, "Not Found", "Bad tag reference: %s", revname);
goto cleanup;
}
obj = parse_object(the_repository, &oid);
if (!obj) {
- cgit_print_error_page(500, "Internal Server Error",
- "Bad object id: %s", oid_to_hex(&oid));
+ cgit_print_error_page(500, "Internal Server Error", "Bad object id: %s", oid_to_hex(&oid));
goto cleanup;
}
if (obj->type == OBJ_TAG)