git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] gitweb: links to patch action in commitdiff and shortlog view

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Nov 29, 2008, 13:41 UTC
Message-ID
<1227966071-11104-3-git-send-email-giuseppe.bilotta@gmail.com>
In-Reply-To
<1227966071-11104-2-git-send-email-giuseppe.bilotta@gmail.com>
The link from commitdiff view is an obviously needed one, but we also
offer the option to link to the patchset in shortlog view, when there
are less than 15 commits being shown.
---
 gitweb/gitweb.perl |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index befe6b6..5b18fdf 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -5382,7 +5382,9 @@ sub git_commitdiff {
 	if ($format eq 'html') {
 		$formats_nav =
 			$cgi->a({-href => href(action=>"commitdiff_plain", -replay=>1)},
-			        "raw");
+			        "raw") . " | " .
+			$cgi->a({-href => href(action=>"patch", -replay=>1)},
+			        "patch");
 
 		if (defined $hash_parent &&
 		    $hash_parent ne '-c' && $hash_parent ne '--cc') {
@@ -5915,6 +5917,12 @@ sub git_shortlog {
 			$cgi->a({-href => href(-replay=>1, page=>$page+1),
 			         -accesskey => "n", -title => "Alt-n"}, "next");
 	}
+	# TODO this should be configurable
+	if ($#commitlist <= 15) {
+		$paging_nav .= " &sdot; " .
+			$cgi->a({-href => href(action=>"patch", -replay=>1)},
+			        $#commitlist > 1 ? "patchset" : "patch");
+	}
 
 	git_header_html();
 	git_print_page_nav('shortlog','', $hash,$hash,$hash, $paging_nav);
-- 
1.5.6.5
Previous: Giuseppe BilottaNext: Sverre Rabbelier
Message 3 of 13 in “gitweb: patch view”
  1. 0/2 gitweb: patch viewGiuseppe Bilotta, Nov 29, 2008
  2. 1/2 gitweb: add patch viewGiuseppe Bilotta, Nov 29, 2008
  3. 2/2 gitweb: links to patch action in commitdiff and shortlog viewGiuseppe Bilotta, Nov 29, 2008
  4. Sverre RabbelierNov 29, 2008
  5. Jakub NarebskiNov 29, 2008
  6. Giuseppe BilottaNov 29, 2008
  7. Sverre RabbelierNov 29, 2008
  8. Jakub NarebskiNov 30, 2008
  9. Giuseppe BilottaNov 30, 2008
  10. Jakub NarebskiDec 1, 2008
  11. Giuseppe BilottaDec 1, 2008
  12. Jakub NarebskiDec 1, 2008
  13. Giuseppe BilottaDec 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.