Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
gitweb: Fix bug in evaluate_path_info
author
Jakub Narebski
<jnareb@gmail.com>
Wed, 13 Oct 2010 11:33:48 +0000
(13:33 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 13 Oct 2010 16:40:19 +0000
(09:40 -0700)
There was bug in parsing "project/:/file" and "project/:/" path_info
URLs, with implicit HEAD as 'hash_base'.
For such URLs the refname is empty, and before this fix regexp for
parsing path_info fragment assumed that it is always non-empty.
Refname cannot contain ':', as per 'git check-ref-format'.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
ae5e97e
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index e5910ce8f93cbfb92fdb2ed63c65140d9b8b39b3..c4d3e0846a546435dad8386674ac0049574789e0 100755
(executable)
--- a/
gitweb/gitweb.perl
+++ b/
gitweb/gitweb.perl
@@
-780,10
+780,10
@@
sub evaluate_path_info {
'history',
);
- # we want to catch
+ # we want to catch
, among others
# [$hash_parent_base[:$file_parent]..]$hash_parent[:$file_name]
my ($parentrefname, $parentpathname, $refname, $pathname) =
- ($path_info =~ /^(?:(.+?)(?::(.+))?\.\.)?(
.+?)
(?::(.+))?$/);
+ ($path_info =~ /^(?:(.+?)(?::(.+))?\.\.)?(
[^:]+?)?
(?::(.+))?$/);
# first, analyze the 'current' part
if (defined $pathname) {