git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Petr BaudisNext: Junio C Hamano
Message 6 of 7 in “[RFC] Introduce Git.pm”
  1. [RFC] Introduce Git.pmPetr Baudis, Jun 22, 2006
  2. Junio C HamanoJun 22, 2006
  3. Alex RiesenJun 22, 2006
  4. Eric WongJun 22, 2006
  5. Petr BaudisJun 22, 2006
  6. Jakub NarebskiJun 22, 2006
  7. Junio C HamanoJun 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.