about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--third_party/cgit/cgit.css8
-rw-r--r--third_party/cgit/ui-log.c10
2 files changed, 18 insertions, 0 deletions
diff --git a/third_party/cgit/cgit.css b/third_party/cgit/cgit.css
index 51ddbf833754..7133a7ba373e 100644
--- a/third_party/cgit/cgit.css
+++ b/third_party/cgit/cgit.css
@@ -668,6 +668,13 @@ div#cgit a.branch-deco {
 	border: solid 1px #007700;
 }
 
+div#cgit a.rev-deco {
+	color: #000;
+	padding: 0px 0.25em;
+	background-color: #eee;
+	border: solid 1px #aaa;
+}
+
 div#cgit a.tag-deco {
 	color: #000;
 	padding: 0px 0.25em;
@@ -700,6 +707,7 @@ div#cgit div.commit-subject a.branch-deco,
 div#cgit div.commit-subject a.tag-deco,
 div#cgit div.commit-subject a.tag-annotated-deco,
 div#cgit div.commit-subject a.remote-deco,
+div#cgit div.commit-subject a.rev-deco,
 div#cgit div.commit-subject a.deco {
 	font-size: 75%;
 }
diff --git a/third_party/cgit/ui-log.c b/third_party/cgit/ui-log.c
index cfa9192b9365..6cd258c1ccf2 100644
--- a/third_party/cgit/ui-log.c
+++ b/third_party/cgit/ui-log.c
@@ -71,6 +71,16 @@ void show_commit_decorations(struct commit *commit)
 		strlcpy(buf, prettify_refname(deco->name), sizeof(buf));
 		switch(deco->type) {
 		case DECORATION_NONE:
+			/* If it is a depot revision, display it, otherwise
+			 * ... */
+			if (strncmp("refs/r/", buf, 7) == 0) {
+				html(" ");
+				cgit_log_link(/* trim 'refs/' */ buf + 5,
+					NULL, "rev-deco", buf, NULL,
+					ctx.qry.vpath, 0, NULL, NULL,
+					ctx.qry.showmsg, 0);
+			}
+
 			/* If the git-core doesn't recognize it,
 			 * don't display anything. */
 			break;