mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 08:28:42 +00:00
ui-log: add <span/> around commit decorations
This helps projects that have a large number of tags to display them all using custom CSS. The default stylesheet has not been updated since what is useful for projects with a lot of tags is not the same as what is useful for projects with only a small number of decorations per commit. Suggested-by: Konstantin Ryabitsev <mricon@kernel.org> Signed-off-by: John Keeping <john@keeping.me.uk>
This commit is contained in:
parent
c2b79dd8e0
commit
927060c5d8
2
ui-log.c
2
ui-log.c
@ -61,6 +61,7 @@ void show_commit_decorations(struct commit *commit)
|
|||||||
|
|
||||||
buf[sizeof(buf) - 1] = 0;
|
buf[sizeof(buf) - 1] = 0;
|
||||||
deco = lookup_decoration(&name_decoration, &commit->object);
|
deco = lookup_decoration(&name_decoration, &commit->object);
|
||||||
|
html("<span class='decoration'>");
|
||||||
while (deco) {
|
while (deco) {
|
||||||
if (!prefixcmp(deco->name, "refs/heads/")) {
|
if (!prefixcmp(deco->name, "refs/heads/")) {
|
||||||
strncpy(buf, deco->name + 11, sizeof(buf) - 1);
|
strncpy(buf, deco->name + 11, sizeof(buf) - 1);
|
||||||
@ -94,6 +95,7 @@ void show_commit_decorations(struct commit *commit)
|
|||||||
next:
|
next:
|
||||||
deco = deco->next;
|
deco = deco->next;
|
||||||
}
|
}
|
||||||
|
html("</span>");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_commit(struct commit *commit, struct rev_info *revs)
|
static void print_commit(struct commit *commit, struct rev_info *revs)
|
||||||
|
Loading…
Reference in New Issue
Block a user