aboutsummaryrefslogtreecommitdiffstats
path: root/ui-log.c
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-08-03 17:52:44 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-08-03 17:52:44 +0200
commit42f8840323a219d3eca59a7a2a388c3a28eeb8fb (patch)
treeec799ab66ed4119b68268192ea8fbe62a96b51aa /ui-log.c
parent343a8b8ee33f9a181e662fc0e3a3979dd9b52dd4 (diff)
parent824138e59194acaf5efe53690d4ef6eaf38e1549 (diff)
downloadcgit-42f8840323a219d3eca59a7a2a388c3a28eeb8fb.tar.gz
cgit-42f8840323a219d3eca59a7a2a388c3a28eeb8fb.tar.xz
Merge branch 'master' of https://git.zx2c4.com/cgit into local
Diffstat (limited to 'ui-log.c')
-rw-r--r--ui-log.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui-log.c b/ui-log.c
index 8e36fba..d696e20 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -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)
@@ -149,8 +153,8 @@ static int show_commit(struct commit *commit, struct rev_info *revs)
rem_lines = 0;
revs->diffopt.flags.recursive = 1;
- diff_tree_oid(&parent->tree->object.oid,
- &commit->tree->object.oid,
+ diff_tree_oid(&parent->maybe_tree->object.oid,
+ &commit->maybe_tree->object.oid,
"", &revs->diffopt);
diffcore_std(&revs->diffopt);