Commit Diff


commit - 1b33afc076fe3093ec111efe027938b1ba2c9489
commit + bf93a5c0fdac6a15fa1cc764734f5cd7b7f0bae1
blob - 33a8c27a825a76a8127cf4d6e3ffa038c1220278
blob + bc35b62b4cd03e73dae2b59541b89aad6bd46030
--- gotweb/files/htdocs/gotweb/gotweb.css
+++ gotweb/files/htdocs/gotweb/gotweb.css
@@ -57,6 +57,11 @@ body {
 	background-color: #d8f3ef;
 }
 
+#refs_str {
+	background-color: #243647;
+	color: #ffffff;
+	font-style: italic;
+}
 #dotted_line {
 	clear: left;
 	float: left;
blob - 8bd298951ae1c62053d10eda269059ec7119818a
blob + 90aca11b30f8d341264a5846b631794a1939800a
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -1143,7 +1143,34 @@ gw_briefs(struct gw_trans *gw_trans)
 		kerr = khtml_puts(gw_trans->gw_html_req, n_header->commit_msg);
 		if (kerr != KCGI_OK)
 			goto done;
-		kerr = khtml_closeelem(gw_trans->gw_html_req, 2);
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+		if (kerr != KCGI_OK)
+			goto done;
+
+		if (n_header->refs_str) {
+			kerr = khtml_puts(gw_trans->gw_html_req, " ");
+			if (kerr != KCGI_OK)
+				goto done;
+			kerr = khtml_attr(gw_trans->gw_html_req, KELEM_SPAN,
+			    KATTR_ID, "refs_str", KATTR__MAX);
+			if (kerr != KCGI_OK)
+			goto done;
+			kerr = khtml_puts(gw_trans->gw_html_req, "(");
+			if (kerr != KCGI_OK)
+				goto done;
+			kerr = khtml_puts(gw_trans->gw_html_req,
+			    n_header->refs_str);
+			if (kerr != KCGI_OK)
+				goto done;
+			kerr = khtml_puts(gw_trans->gw_html_req, ")");
+			if (kerr != KCGI_OK)
+				goto done;
+			kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+			if (kerr != KCGI_OK)
+				goto done;
+		}
+
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
 		if (kerr != KCGI_OK)
 			goto done;
 
@@ -1353,17 +1380,6 @@ gw_summary(struct gw_trans *gw_trans)
 	kerr = khtml_puts(gw_trans->gw_html_req, "Commit Briefs");
 	if (kerr != KCGI_OK)
 		goto done;
-	if (gw_trans->headref) {
-		kerr = khtml_puts(gw_trans->gw_html_req, " (");
-		if (kerr != KCGI_OK)
-			goto done;
-		kerr = khtml_puts(gw_trans->gw_html_req, gw_trans->headref);
-		if (kerr != KCGI_OK)
-			goto done;
-		kerr = khtml_puts(gw_trans->gw_html_req, ")");
-		if (kerr != KCGI_OK)
-			goto done;
-	}
 	kerr = khtml_closeelem(gw_trans->gw_html_req, 2);
 	if (kerr != KCGI_OK)
 		goto done;
@@ -2065,6 +2081,10 @@ gw_gen_commit_header(struct gw_trans *gw_trans, char *
 	if (kerr != KCGI_OK)
 		goto done;
 	if (str2 != NULL) {
+		kerr = khtml_attr(gw_trans->gw_html_req, KELEM_SPAN,
+		    KATTR_ID, "refs_str", KATTR__MAX);
+		if (kerr != KCGI_OK)
+			goto done;
 		kerr = khtml_puts(gw_trans->gw_html_req, "(");
 		if (kerr != KCGI_OK)
 			goto done;
@@ -2072,6 +2092,9 @@ gw_gen_commit_header(struct gw_trans *gw_trans, char *
 		if (kerr != KCGI_OK)
 			goto done;
 		kerr = khtml_puts(gw_trans->gw_html_req, ")");
+		if (kerr != KCGI_OK)
+			goto done;
+		kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
 		if (kerr != KCGI_OK)
 			goto done;
 	}
@@ -3033,6 +3056,11 @@ gw_get_commits(struct gw_trans * gw_trans, struct gw_h
 				error = got_error_from_errno("malloc");
 				goto done;
 			}
+			error = got_ref_list(&n_header->refs, gw_trans->repo,
+			    NULL, got_ref_cmp_by_name, NULL);
+			if (error)
+				goto done;
+
 			error = gw_get_commit(gw_trans, n_header, commit, id);
 			if (error)
 				goto done;