From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH/RFC] gitweb: Restore old git_blame using git-annotate under "annotate"
Date: Sat, 26 Aug 2006 01:47:09 +0200 [thread overview]
Message-ID: <200608260147.10880.jnareb@gmail.com> (raw)
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.
git_annotate doesn't work correctly yet - error during parsing
some lines. Needs investigation.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Not for work, just for testing and comparing the two implementations.
Applies cleanly to 'next' (v1.4.2-g6580c6b).
gitweb/gitweb.perl | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a6d6637..6344263 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
next reply other threads:[~2006-08-25 23:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-25 23:47 Jakub Narebski [this message]
2006-08-26 0:13 ` [PATCH] gitweb: git_annotate didn't expect negative numeric timezone Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200608260147.10880.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.