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

Re: Git global usage and tests

From
Carlos Martín Nieto <cmn@elego.de>
Date
May 31, 2011, 09:05 UTC
Message-ID
<20110531090554.GE28708@centaur.lab.cmartin.tk>
In-Reply-To
<buor57f78s0.fsf@dhlpc061.dev.necel.com>
On Tue, May 31, 2011 at 02:12:47PM +0900, Miles Bader wrote:
Show 13 quoted lines
> Jeff King <peff@peff.net> writes:
> >> Yes and No. We have already copied some code from git : parse-option,
> >> the error handling functions, a part of the run-command block and a
> >> part of the compatibility layer. To my mind, there is no reason to
> >> pull it into libgit2 as it's only a client feature that works on
> >> strings, and libgit2 does not aim at being a client, only a git
> >> library.
> >
> > Yeah, good point. Definitely it should not be part of the libgit2
> > library itself.
> 
> But maybe there's room for another library to hold such things
> (libgitapp...)?

There are already several libraries to parse command-line options, though IIRC from the last time I used getopt, git's parse-options is more usable. That could be made into a new library (but which should be git-independent)

The git-specific part of figuring out commits and commit ranges could live inside libgit2.

Cheers,
   cmn
-- 
Carlos Martín Nieto | http://cmartin.tk

"¿Cómo voy a decir bobadas si soy mudo?" -- CACHAI
Previous: Miles BaderNext: Junio C Hamano
Message 6 of 9 in “Git global usage and tests”
  1. Romain GeisslerMay 30, 2011
  2. Jeff KingMay 30, 2011
  3. Romain GeisslerMay 30, 2011
  4. Jeff KingMay 30, 2011
  5. Miles BaderMay 31, 2011
  6. Carlos Martín NietoMay 31, 2011
  7. Junio C HamanoMay 31, 2011
  8. Ævar Arnfjörð BjarmasonMay 31, 2011
  9. Jeff KingMay 31, 2011

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.