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

Re: Regarding GIT API

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Feb 15, 2011, 11:49 UTC
Message-ID
<AANLkTim4ucYtoyNEM2+=-dJTmpBtqy1zJOEX3k3Wk+XU@mail.gmail.com>
In-Reply-To
<loom.20110215T120434-373@post.gmane.org>
On Tue, Feb 15, 2011 at 11:08:14AM +0000, Abhinav Goyal wrote:
> I just need the git command
> support for my C++ application. I have my own reason for not using command
> prompt system call.

If you need full git functionality, currently the only proper way is to use git porcelain command, i.e. run commands using system() and parse their output. Git porcelain commands are designed to be used in this way, so their output is easy to parse. Also, their output should not change between different versions, in contrast to front-end git commands, which provide more human oriented output.

NOTE: There are libraries for some other languages such as Java and Ruby
(jGit and Grit correspondingly), but they contain re-implementation of
most git functionality. No one has bothered to write anything like that
in C. So, libgit2 provides only low-level and very limited functionality.

More information about git interfaces to different languages, you can find here:

https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Interfaces_to_other_programming_languages
Dmitry
Previous: Marc WeberNext: Michael J Gruber
Message 4 of 6 in “Regarding GIT API”
  1. Abhinav GoyalFeb 15, 2011
  2. Erik Faye-LundFeb 15, 2011
  3. Marc WeberFeb 15, 2011
  4. Dmitry PotapovFeb 15, 2011
  5. Michael J GruberFeb 15, 2011
  6. Dmitry PotapovFeb 15, 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.