diff options
author | Christian Hesse <mail@eworm.de> | 2018-06-05 12:46:13 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-06-05 13:39:19 +0200 |
commit | 6b6296f788bdf1c524b5af3973130b8d3625d823 (patch) | |
tree | eec2270502442249f7b9d0d89fe649a40c264ede | |
parent | 33414d7869aa55aaccd45cdb82268d454cb79863 (diff) | |
download | cgit-ch/annotated-tags.tar.gz |
ui-log: highlight annotated tags in different colorch/annotated-tags
Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r-- | cgit.css | 8 | ||||
-rw-r--r-- | ui-log.c | 6 |
2 files changed, 13 insertions, 1 deletions
@@ -685,6 +685,14 @@ div#cgit a.tag-deco { border: solid 1px #777700; } +div#cgit a.tag-annotated-deco { + color: #000; + margin: 0px 0.5em; + padding: 0px 0.25em; + background-color: #ffcc88; + border: solid 1px #777700; +} + div#cgit a.remote-deco { color: #000; margin: 0px 0.5em; @@ -65,6 +65,8 @@ void show_commit_decorations(struct commit *commit) return; html("<span class='decoration'>"); while (deco) { + struct object_id peeled; + int is_annotated = 0; strncpy(buf, prettify_refname(deco->name), sizeof(buf) - 1); switch(deco->type) { case DECORATION_NONE: @@ -77,7 +79,9 @@ void show_commit_decorations(struct commit *commit) ctx.qry.showmsg, 0); break; case DECORATION_REF_TAG: - cgit_tag_link(buf, NULL, "tag-deco", buf); + if (!peel_ref(deco->name, &peeled)) + is_annotated = !oidcmp(&commit->object.oid, &peeled); + cgit_tag_link(buf, NULL, is_annotated ? "tag-annotated-deco" : "tag-deco", buf); break; case DECORATION_REF_REMOTE: if (!ctx.repo->enable_remote_branches) |