Petr Baudis wrote: > On Thu, Oct 02, 2008 at 11:05:18PM +0200, Giuseppe Bilotta wrote: > > > > In preparing the new patchset, I've put a big comment block explaining > > why we need to set both $hash and $hash_base in this code-path: > > > > # we got "project.git/[action/]branch". in this case > > # we set both $hash and $hash_base because different actions > > # need one or the other to be set to behave correctly. > > # > > # For example, if $hash_base is not set then the blob and 'blob' without $file_name doesn't have sense, but 'tree' does. Probably should be s/blob/tree/ above. > > # history links on the page project.git/tree/somebranch will > > # assume a $hash_base of HEAD instead of the correct > > # somebranch. > > # Conversely, not setting $hash will make URLs such as > > # project.git/shortlog/somebranch display the wrong page. > > # > > # Since it also turns out that the unused one is properly > > # overwritten as needed, setting both is quite safe. > > Ok, but is this related to the pathinfo changes? Or is this fixing a > separate bug? (Not that I would want to bother you with splitting this, > but you should at least mention it in the commit message... and it's > fairly isolated anyway.) Yes, it related to path_info changes. With current code the only way to get to no $file_name branch of evaluate_path_info() code was to have URL which looks like project/branch, for which 'shortlog' action was chosen (if not specified by CGI query parameters), and for 'shortlog' action the correct way was to use $hash. Now there can be project/tree/branch to show top directory of given branch, and this as described required $hash_base set. -- Jakub Narebski Poland -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html