From: Junio C Hamano Date: Tue, 05 Dec 2006 01:08:27 GMT Subject: Re: [RFC] gitweb: Add committags support (take 2) Message-ID: <7v3b7vm9o4.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <200612041233.19377.jnareb@gmail.com> Jakub Narebski writes: > You might have sha1 ids in commit message which no longer point to valid > (existing) object, for example commit which is result of > "git cherry-pick -x" from no longer existing temporary branch, or commit > which is result of "git revert" on a branch which got rebased (but not > reorganized), or shortened sha1 which is no longer unique. This should > not cause errors to be written to webserver log. True. > By the way, is it better to use anonymous subroutines for committags > subs, or use explicit subroutines? I vaguely recall a thread that discussed pros and cons of using anonymous subroutines in certain parts of gitweb some time ago in which even Merlyn had some comments in, but I do not recall the technical details, sorry. My gut feeling is that the way you illustrated your example "our %committags" definition is fine, but it _might_ turn out that it is easier for sites or for projects to customize their own set of rewrite rules if you had explicitly named subroutines available. I dunno.