gitweb: Improve behavior for actionless path_info gitweb URLs
authorJakub Narebski <jnareb@gmail.com>
Wed, 13 Oct 2010 11:35:20 +0000 (13:35 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Oct 2010 16:40:38 +0000 (09:40 -0700)
Eli Barzilay noticed that

http://server/gitweb/project/<commit-sha1>

link goes to 'shortlog' view, while 'commit' view would be more
useful, but that 'shortlog' action is more apropriate for

http://server/gitweb/project/<commit-sha1>..<other-commit-sha1>

links.

Therefore for the case when we don't have either action, or filename,
or parent hash [base] in path_info-based URL, i.e. for

http://server/gitweb/project/<object-id>

link, instead of using 'shortlog' view we allow dispatch() subroutine
to detect type of object and use appropriate action (in most case it
would be either 'commit' action, or 'tag', or 'tree' for top
directory).

Requested-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Tested-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found