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

[PATCH 1/7] gitweb: Restore old git_blame using git-annotate under "annotate"

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 26, 2006, 17:14 UTC
Message-ID
<11566124661001-git-send-email-jnareb@gmail.com>
In-Reply-To
<1156612392716-git-send-email-jnareb@gmail.com>

Rename git_blame to git_annotate, and git_blame2 to git_blame. Link git_annotate under "annotate" action. Add link to "blame in git_annotate, and to "annotate" in git_blame.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index e00a6ed..abd0f0d 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -229,7 +229,8 @@ if (defined $searchtext) {
 
 # dispatch
 my %actions = (
-	"blame" => \&git_blame2,
+	"blame" => \&git_blame,
+	"annotate" => \&git_annotate,
 	"blobdiff" => \&git_blobdiff,
 	"blobdiff_plain" => \&git_blobdiff_plain,
 	"blob" => \&git_blob,
@@ -2166,7 +2167,7 @@ sub git_tag {
 	git_footer_html();
 }
 
-sub git_blame2 {
+sub git_blame {
 	my $fd;
 	my $ftype;
 
@@ -2193,6 +2194,9 @@ sub git_blame2 {
 		$cgi->a({-href => href(action=>"blob", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},
 		        "blob") .
 		" | " .
+		$cgi->a({-href => href(action=>"annotate", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},
+		        "annotate") .
+		" | " .
 		$cgi->a({-href => href(action=>"blame", file_name=>$file_name)},
 		        "head");
 	git_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);
@@ -2236,7 +2240,7 @@ HTML
 	git_footer_html();
 }
 
-sub git_blame {
+sub git_annotate {
 	my $fd;
 
 	if (!gitweb_check_feature('blame')) {
@@ -2258,6 +2262,9 @@ sub git_blame {
 		$cgi->a({-href => href(action=>"blob", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},
 		        "blob") .
 		" | " .
+		$cgi->a({-href => href(action=>"blame", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},
+		        "blame") .
+		" | " .
 		$cgi->a({-href => href(action=>"blame", file_name=>$file_name)},
 		        "head");
 	git_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);
-- 
1.4.1.1
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 11 in “gitweb: Cleanups, fixes and small improvements”
  1. 0/7 gitweb: Cleanups, fixes and small improvementsJakub Narebski, Aug 26, 2006
  2. 1/7 gitweb: Restore old git_blame using git-annotate under "annotate"Jakub Narebski, Aug 26, 2006
  3. 2/7 gitweb: Remove workaround for git-diff bug fixed in f82cd3cJakub Narebski, Aug 26, 2006
  4. 3/7 gitweb: Improve comments about gitweb features configurationJakub Narebski, Aug 26, 2006
  5. 4/7 gitweb: Fix typo in git_patchset_bodyJakub Narebski, Aug 26, 2006
  6. 5/7 gitweb: Use 'local $/ = undef;' before 'print <$fd>;'Jakub Narebski, Aug 26, 2006
  7. 6/7 gitweb: blobs defined by non-textual hash ids can be cachedJakub Narebski, Aug 26, 2006
  8. 7/7 gitweb: Always link to plain version of the blob in git_blob.Jakub Narebski, Aug 26, 2006
  9. Junio C HamanoAug 26, 2006
  10. Jakub NarebskiAug 26, 2006
  11. Jakub NarebskiAug 27, 2006

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.