Re: [PATCH] [RFC] Introduce Git.pm
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jun 22, 2006, 08:07 UTC
- Message-ID
- <e7dj4h$cv7$1@sea.gmane.org>
- In-Reply-To
- <20060622003546.17760.23089.stgit@machine.or.cz>
Petr Baudis wrote:
> Most desirable now is proper error reporting, generic_in() for feeding > input to Git commands and the repository() constructor doing some poking > with git-rev-parse to get the git directory and subdirectory prefix. > Those three are basically the prerequisities for converting git-mv.
I think that repository() constructor (to be converted in the 'new' constructor I guess) should take 'binbin => "/usr/bin"' argument optionally, to find where git binary is. 'libexecdir' can be also supported, or one can get it from 'git --exec-path' and save.
> Currently Git.pm just wraps up exec()s of Git commands, but even that > is not trivial to get right and various Git perl scripts do it in > various inconsistent ways.
It would be nice to have also wrapers to reading files from git repository, ate least some generic read_file/readdir.
For example it might be faster to list branches and/or tags by directly reading $GIT_DIR/refs directory than using 'git branch' or 'git tag -l'.
-- Jakub Narebski Warsaw, Poland ShadeHawk on #git