about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-10-28 15:40:47 +0100
committerLars Hjemli <hjemli@gmail.com>2007-10-28 15:41:58 +0100
commitfc5880fab8b9afc589aaadd1299c34a6ef2a3c2d (patch)
treea429f34b01fc1ce9a90d46b81915db5fa124f83b
parentMake print_branch() handle refs not pointing at commits (diff)
downloadcgit-pink-fc5880fab8b9afc589aaadd1299c34a6ef2a3c2d.tar.gz
cgit-pink-fc5880fab8b9afc589aaadd1299c34a6ef2a3c2d.zip
Teach cgit_object_link() about tag objects
This makes random tag links more helpfull, e.g. when a branch head references
a tag object, link to the tag page.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r--ui-shared.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 45105dc..1418010 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -272,6 +272,9 @@ void cgit_object_link(struct object *obj)
 	} else if (obj->type == OBJ_TREE) {
 		page = "tree";
 		arg = "id";
+	} else if (obj->type == OBJ_TAG) {
+		page = "tag";
+		arg = "id";
 	} else {
 		page = "blob";
 		arg = "id";
/src/commit/bin/Makefile?id=c5c30c613722567b9cd67b8bc575f6d79370940f&follow=1'>Generate HTML with hi -n -f html -o anchorJune McEnroe 2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe 2019-02-17Simplify temp trap in upJune McEnroe 2019-02-17Add line numbers to hiJune McEnroe 2019-02-17Always split spans after newlinesJune McEnroe 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe