mirror of
https://github.com/git/git.git
synced 2026-03-13 10:23:30 +01:00
Merge branch 'master' into next
* master: Better advice on using topic branches for kernel development Documentation: update implicit "--no-index" behavior in "git diff" Documentation: expand 'git diff' SEE ALSO section Documentation: diff can compare blobs Documentation: gitrevisions is in section 7 fast-import: Allow filemodify to set the root shell portability: no "export VAR=VAL" CodingGuidelines: reword parameter expansion section Documentation: update-index: -z applies also to --index-info gitweb: Improve behavior for actionless path_info gitweb URLs gitweb: Fix bug in evaluate_path_info gitweb: Fix test of highlighting support in t9500 t5503: fix typo Documentation: No argument of ALLOC_GROW should have side-effects commit-tree: free commit message before exiting
This commit is contained in:
@@ -781,10 +781,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) {
|
||||
@@ -820,8 +820,15 @@ sub evaluate_path_info {
|
||||
# hash_base instead. It should also be noted that hand-crafted
|
||||
# links having 'history' as an action and no pathname or hash
|
||||
# set will fail, but that happens regardless of PATH_INFO.
|
||||
$input_params{'action'} ||= "shortlog";
|
||||
if (grep { $_ eq $input_params{'action'} } @wants_base) {
|
||||
if (defined $parentrefname) {
|
||||
# if there is parent let the default be 'shortlog' action
|
||||
# (for http://git.example.com/repo.git/A..B links); if there
|
||||
# is no parent, dispatch will detect type of object and set
|
||||
# action appropriately if required (if action is not set)
|
||||
$input_params{'action'} ||= "shortlog";
|
||||
}
|
||||
if ($input_params{'action'} &&
|
||||
grep { $_ eq $input_params{'action'} } @wants_base) {
|
||||
$input_params{'hash_base'} ||= $refname;
|
||||
} else {
|
||||
$input_params{'hash'} ||= $refname;
|
||||
|
||||
Reference in New Issue
Block a user