git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: Add history and blame to git_difftree_body()
@ 2006-09-28  0:24 Luben Tuikov
  2006-10-01 16:41 ` Jakub Narebski
  0 siblings, 1 reply; 4+ messages in thread
From: Luben Tuikov @ 2006-09-28  0:24 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]

Add blame and history to Deleted files.
Add blame and history to Modified or Type changed files.
Add blame and history to Renamed or Copied files.

This allows us to do
	blame->commit->blame->commit->blame->...
instead of
	blame->commit->file->blame->commit->file->blame->...
which is longer and easier to get wrong.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 gitweb/gitweb.perl |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

[-- Attachment #2: 3222950043-p3.txt --]
[-- Type: text/plain, Size: 2544 bytes --]

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c87f60e..f772fa3 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1721,9 +1721,12 @@ sub git_difftree_body {
 				print $cgi->a({-href => "#patch$patchno"}, "patch");
 				print " | ";
 			}
+			print $cgi->a({-href => href(action=>"blame", hash_base=>$parent,
+						     file_name=>$diff{'file'})},
+				      "blame") . " | ";
 			print $cgi->a({-href => href(action=>"history", hash_base=>$parent,
-			                             file_name=>$diff{'file'})},
-			              "history");
+						     file_name=>$diff{'file'})},
+				      "history");
 			print "</td>\n";
 
 		} elsif ($diff{'status'} eq "M" || $diff{'status'} eq "T") { # modified, or type changed
@@ -1763,8 +1766,11 @@ sub git_difftree_body {
 				}
 				print " | ";
 			}
-			print $cgi->a({-href => href(action=>"history",
-						     hash_base=>$hash, file_name=>$diff{'file'})},
+			print $cgi->a({-href => href(action=>"blame", hash_base=>$hash,
+						     file_name=>$diff{'file'})},
+				      "blame") . " | ";
+			print $cgi->a({-href => href(action=>"history", hash_base=>$hash,
+						     file_name=>$diff{'file'})},
 				      "history");
 			print "</td>\n";
 
@@ -1790,17 +1796,22 @@ sub git_difftree_body {
 				if ($action eq 'commitdiff') {
 					# link to patch
 					$patchno++;
-					print " | " .
-						$cgi->a({-href => "#patch$patchno"}, "patch");
+					print $cgi->a({-href => "#patch$patchno"}, "patch");
 				} else {
-					print " | " .
-						$cgi->a({-href => href(action=>"blobdiff",
-						                       hash=>$diff{'to_id'}, hash_parent=>$diff{'from_id'},
-						                       hash_base=>$hash, hash_parent_base=>$parent,
-						                       file_name=>$diff{'to_file'}, file_parent=>$diff{'from_file'})},
-						        "diff");
+					print $cgi->a({-href => href(action=>"blobdiff",
+								     hash=>$diff{'to_id'}, hash_parent=>$diff{'from_id'},
+								     hash_base=>$hash, hash_parent_base=>$parent,
+								     file_name=>$diff{'to_file'}, file_parent=>$diff{'from_file'})},
+						      "diff");
 				}
+				print " | ";
 			}
+			print $cgi->a({-href => href(action=>"blame", hash_base=>$parent,
+						     file_name=>$diff{'from_file'})},
+				      "blame") . " | ";
+			print $cgi->a({-href => href(action=>"history", hash_base=>$parent,
+						     file_name=>$diff{'from_file'})},
+				      "history");
 			print "</td>\n";
 
 		} # we should not encounter Unmerged (U) or Unknown (X) status
-- 
1.4.2.1.g271e


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gitweb: Add history and blame to git_difftree_body()
  2006-09-28  0:24 [PATCH] gitweb: Add history and blame to git_difftree_body() Luben Tuikov
@ 2006-10-01 16:41 ` Jakub Narebski
  2006-10-02 19:32   ` Luben Tuikov
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2006-10-01 16:41 UTC (permalink / raw)
  To: git

Luben Tuikov wrote:

> Add blame and history to Deleted files.
> Add blame and history to Modified or Type changed files.
> Add blame and history to Renamed or Copied files.

Blame has to be added conditionally (gitweb_have_blame).
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gitweb: Add history and blame to git_difftree_body()
  2006-10-01 16:41 ` Jakub Narebski
@ 2006-10-02 19:32   ` Luben Tuikov
  2006-10-02 19:55     ` Jakub Narebski
  0 siblings, 1 reply; 4+ messages in thread
From: Luben Tuikov @ 2006-10-02 19:32 UTC (permalink / raw)
  To: Jakub Narebski, git

--- Jakub Narebski <jnareb@gmail.com> wrote:
> Luben Tuikov wrote:
> 
> > Add blame and history to Deleted files.
> > Add blame and history to Modified or Type changed files.
> > Add blame and history to Renamed or Copied files.
> 
> Blame has to be added conditionally (gitweb_have_blame).

Can you please not edit the CC field when you reply?
I can see that only the GIT mailing list was left,
but my email had been removed.

Thanks,
   Luben

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gitweb: Add history and blame to git_difftree_body()
  2006-10-02 19:32   ` Luben Tuikov
@ 2006-10-02 19:55     ` Jakub Narebski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Narebski @ 2006-10-02 19:55 UTC (permalink / raw)
  To: Luben Tuikov; +Cc: git

Luben Tuikov wrote:
> --- Jakub Narebski <jnareb@gmail.com> wrote:
> > Luben Tuikov wrote:
> > 
> > > Add blame and history to Deleted files.
> > > Add blame and history to Modified or Type changed files.
> > > Add blame and history to Renamed or Copied files.
> > 
> > Blame has to be added conditionally (gitweb_have_blame).
> 
> Can you please not edit the CC field when you reply?
I do not edit Cc: field. I reply via GMane NNTP (Usenet)
interface.

> I can see that only the GIT mailing list was left,
> but my email had been removed.
It was not removed, it was not added.

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-02 19:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-28  0:24 [PATCH] gitweb: Add history and blame to git_difftree_body() Luben Tuikov
2006-10-01 16:41 ` Jakub Narebski
2006-10-02 19:32   ` Luben Tuikov
2006-10-02 19:55     ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).