the repository which powers this website
Diffstat (limited to 'themed/commit.html')
-rw-r--r--themed/commit.html15
1 files changed, 8 insertions, 7 deletions
diff --git a/themed/commit.html b/themed/commit.html
index a3da15e3..90795584 100644
--- a/themed/commit.html
+++ b/themed/commit.html
@@ -39,19 +39,20 @@
<span class="font-gray-500 text-sm">{! cgit_print_age(info->committer_date, info->committer_tz, TM_WEEK * 2); !} ago</span>
<div class="flex-1"></div>
<span class="font-gray-500 text-sm">
- {! char short_commit_id[8]; !}
{% for struct commit_list *p = commit->parents; p; p = p->next %}
{! struct commit *parent = lookup_commit_reference(the_repository, &p->item->object.oid); !}
{% if parent %}
- {! memcpy(short_commit_id, oid_to_hex(&p->item->object.oid), 7); !}
- {! short_commit_id[7] = '\0'; !}
- parent <a href="{! cgit_shared_repolink_url_with_delimiter("commit", ctx.qry.head, ctx.qry.vpath); !}id={{ oid_to_hex(&p->item->object.oid) }}" class="font-mono text-blue-500 hover:text-blue-600 hover:underline">{{ short_commit_id }}</a>
+ parent
+ <a href="{! cgit_shared_repolink_url_with_delimiter("commit", ctx.qry.head, ctx.qry.vpath); !}id={{ oid_to_hex(&p->item->object.oid) }}" class="font-mono text-blue-500 hover:text-blue-600 hover:underline">
+ {! short_commit_id(oid_to_hex(&p->item->object.oid)); !}
+ </a>
&middot;
{% endif %}
{% endfor %}
- {! memcpy(short_commit_id, oid_to_hex(&commit->object.oid), 7); !}
- {! short_commit_id[7] = '\0'; !}
- commit <a href="{! cgit_shared_repolink_url_with_delimiter("commit", ctx.qry.head, ctx.qry.vpath); !}id={{ oid_to_hex(&commit->object.oid) }}" class="font-mono text-blue-500 hover:text-blue-600 hover:underline">{{ short_commit_id }}</a>
+ commit
+ <a href="{! cgit_shared_repolink_url_with_delimiter("commit", ctx.qry.head, ctx.qry.vpath); !}id={{ oid_to_hex(&commit->object.oid) }}" class="font-mono text-blue-500 hover:text-blue-600 hover:underline">
+ {! short_commit_id(oid_to_hex(&commit->object.oid)); !}
+ </a>
</span>
</div>
</div>