summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d81c5a)
raw | patch | inline | side by side (parent: 6d81c5a)
author | Luben Tuikov <ltuikov@yahoo.com> | |
Fri, 29 Sep 2006 16:57:43 +0000 (09:57 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 30 Sep 2006 07:23:23 +0000 (00:23 -0700) |
In tree view, by default, hash_base is HEAD and hash is the
entry equivalent. Else the user had selected a hash_base or
hash, say by clicking on a revision or commit, in which case
those values are used.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
entry equivalent. Else the user had selected a hash_base or
hash, say by clicking on a revision or commit, in which case
those values are used.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.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 c8557c85cc0b32307ba8715e197a26dbfad4ad0c..a3c3e7471a7bd3a50ad1301acb26049d9ffe59e0 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
"history");
}
print " | " .
- $cgi->a({-href => href(action=>"blob_plain",
- hash=>$t->{'hash'}, file_name=>"$basedir$t->{'name'}")},
- "raw");
+ $cgi->a({-href => href(action=>"blob_plain", hash_base=>$hash_base,
+ file_name=>"$basedir$t->{'name'}")},
+ "raw");
print "</td>\n";
} elsif ($t->{'type'} eq "tree") {
sub git_tree {
my $have_snapshot = gitweb_have_snapshot();
+ if (!defined $hash_base) {
+ $hash_base = "HEAD";
+ }
if (!defined $hash) {
- $hash = git_get_head_hash($project);
if (defined $file_name) {
- my $base = $hash_base || $hash;
- $hash = git_get_hash_by_path($base, $file_name, "tree");
- }
- if (!defined $hash_base) {
- $hash_base = $hash;
+ $hash = git_get_hash_by_path($hash_base, $file_name, "tree");
+ } else {
+ $hash = $hash_base;
}
}
$/ = "\0";