From 0bb34ef130f05b865ee2a34d196ea6352590f673 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 5 Jun 2018 12:46:13 +0200 Subject: ui-log: highlight annotated tags in different color Annotated tags have some extra information... Descriptive text or signature. Highlighting annotated tags in a different color show what tag may be worth clicking for extra information. Signed-off-by: Christian Hesse Reviewed-by: John Keeping --- ui-log.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ui-log.c') diff --git a/ui-log.c b/ui-log.c index 8e36fba..b5cd2f6 100644 --- a/ui-log.c +++ b/ui-log.c @@ -65,6 +65,8 @@ void show_commit_decorations(struct commit *commit) return; html(""); 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) -- cgit v1.2.3-59-g8ed1b