projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16fdb48
)
gitweb: Make git_get_hash_by_path check type if provided
author
Jakub Narebski
<jnareb@gmail.com>
Thu, 21 Sep 2006 16:09:12 +0000
(18:09 +0200)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 21 Sep 2006 19:55:51 +0000
(12:55 -0700)
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 fb8d37eb7b2a40a2f092f580456aaf4eec1699b5..d3757f49b38e618878ce1fa941d153f3e0a511e4 100755
(executable)
--- a/
gitweb/gitweb.perl
+++ b/
gitweb/gitweb.perl
@@
-718,6
+718,7
@@
sub git_get_project_config {
sub git_get_hash_by_path {
my $base = shift;
my $path = shift || return undef;
+ my $type = shift;
my $tree = $base;
@@
-728,6
+729,10
@@
sub git_get_hash_by_path {
#'100644 blob 0fa3f3a66fb6a137f6ec2c19351ed4d807070ffa panic.c'
$line =~ m/^([0-9]+) (.+) ([0-9a-fA-F]{40})\t(.+)$/;
+ if (defined $type && $type ne $2) {
+ # type doesn't match
+ return undef;
+ }
return $3;
}