Re: [RFC] Git config file reader in Perl (WIP)
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jan 15, 2007, 10:32 UTC
- Message-ID
- <200701151132.00971.jnareb@gmail.com>
- In-Reply-To
- <20070115095613.GA4037@localdomain>
Eric Wong wrote:
Show 19 quoted lines
> Jakub Narebski <jnareb@gmail.com> wrote:
>> Eric Wong wrote:
>>> Jakub Narebski <jnareb@gmail.com> wrote:
>>>> To make gitweb faster I thought about adding to it, or to Git.pm,
>>>> simple nonvalidation config file reader. Nonvalidating means that
>>>> it would accept some input which git-repo-config considers invalid.
>>>
>>> How about something like git-for-each-ref that dumps the entire output
>>> of a config file into an eval()-able string? That way we don't have to
>>> deal with corner-cases and subtle differences between C and Perl
>>> implementations.
>>
>> The idea is (at least for gitweb) to avoid cost of fork. And I think
>> if the format gets documented properly, there should be no differences
>> in config file parsing.
>
> If the Perl output is redirected to a file (say .git/config.perl) and
> only regenerated when .git/config changes, `do(".git/config.perl")' will
> likely be faster since all the parsing will be done by Perl itself.Would you write "git repo-config --perl", then? ;-)
Besides, I'd rather avoid the need for /tmp/gitweb, and I think usually gitweb do not have (and should not have) write access to repository.
-- Jakub Narebski Poland