зеркало из https://github.com/microsoft/git.git
gitweb: Fix bug in evaluate_path_info
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>
This commit is contained in:
Родитель
ae5e97ec40
Коммит
7e00dc58d1
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче