summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af6feeb)
raw | patch | inline | side by side (parent: af6feeb)
author | Jakub Narebski <jnareb@gmail.com> | |
Sun, 19 Nov 2006 21:51:39 +0000 (22:51 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 21 Nov 2006 22:35:41 +0000 (14:35 -0800) |
This finishes work started by commit 4777b0141a4812177390da4b6ebc9d40ac3da4b5
"gitweb: Restore object-named links in item lists"
by Petr Baudis. It brings back rest of "blob" links in difftree-raw
like part of "commit" and "commitdiff" views, namely in
git_difftree_body subroutine.
Now the td.link table cell has the following links:
* link to diff ("blobdiff" view) in "commit" view, if applicable
(there is no link to uninteresting creation/deletion diff), or
link to patch anchor in "commitdiff" view.
* link to current version of file ("blob" view), with the obvious
exception of file deletion, where it is link to the parent
version.
* link to "blame" view, if it is enabled, and file was not just
created (i.e. it has any history).
* link to history of the file ("history" view), again with sole
exception of the case of new file.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
"gitweb: Restore object-named links in item lists"
by Petr Baudis. It brings back rest of "blob" links in difftree-raw
like part of "commit" and "commitdiff" views, namely in
git_difftree_body subroutine.
Now the td.link table cell has the following links:
* link to diff ("blobdiff" view) in "commit" view, if applicable
(there is no link to uninteresting creation/deletion diff), or
link to patch anchor in "commitdiff" view.
* link to current version of file ("blob" view), with the obvious
exception of file deletion, where it is link to the parent
version.
* link to "blame" view, if it is enabled, and file was not just
created (i.e. it has any history).
* link to history of the file ("history" view), again with sole
exception of the case of new file.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a32a6b79c6fd0217e4dce87c3b54f758275f9d9e..ce185d9037e3e53bca3dd2ce0d960e6e2eb5a4a0 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
# link to patch
$patchno++;
print $cgi->a({-href => "#patch$patchno"}, "patch");
+ print " | ";
}
+ print $cgi->a({-href => href(action=>"blob", hash=>$diff{'to_id'},
+ hash_base=>$hash, file_name=>$diff{'file'})},
+ "blob") . " | ";
print "</td>\n";
} elsif ($diff{'status'} eq "D") { # deleted
}
print $cgi->a({-href => href(action=>"blob", hash=>$diff{'from_id'},
hash_base=>$parent, file_name=>$diff{'file'})},
- "blob") . " | ";
+ "blob") . " | ";
if ($have_blame) {
- print $cgi->a({-href =>
- href(action=>"blame",
- hash_base=>$parent,
- file_name=>$diff{'file'})},
- "blame") . " | ";
+ 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'})},
" | ";
}
print $cgi->a({-href => href(action=>"blob", hash=>$diff{'to_id'},
- hash_base=>$hash, file_name=>$diff{'file'})},
- "blob") . " | ";
+ hash_base=>$hash, file_name=>$diff{'file'})},
+ "blob") . " | ";
if ($have_blame) {
- print $cgi->a({-href => href(action=>"blame",
- hash_base=>$hash,
- file_name=>$diff{'file'})},
- "blame") . " | ";
+ 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'})},
"diff") .
" | ";
}
- print $cgi->a({-href => href(action=>"blob", hash=>$diff{'from_id'},
- hash_base=>$parent, file_name=>$diff{'from_file'})},
- "blob") . " | ";
+ print $cgi->a({-href => href(action=>"blob", hash=>$diff{'to_id'},
+ hash_base=>$parent, file_name=>$diff{'to_file'})},
+ "blob") . " | ";
if ($have_blame) {
- print $cgi->a({-href => href(action=>"blame",
- hash_base=>$hash,
- file_name=>$diff{'to_file'})},
- "blame") . " | ";
+ print $cgi->a({-href => href(action=>"blame", hash_base=>$hash,
+ file_name=>$diff{'to_file'})},
+ "blame") . " | ";
}
- print $cgi->a({-href => href(action=>"history", hash_base=>$parent,
- file_name=>$diff{'from_file'})},
+ print $cgi->a({-href => href(action=>"history", hash_base=>$hash,
+ file_name=>$diff{'to_file'})},
"history");
print "</td>\n";