{"thread":{"id":"26507","subject":"Regarding GIT API","startedAt":"2011-02-15T11:08:14Z","lastAt":"2011-02-15T17:09:40Z","messageCount":6,"participants":["Abhinav Goyal","Erik Faye-Lund","Marc Weber","Dmitry Potapov","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"161172","messageId":"loom.20110215T120434-373@post.gmane.org","threadId":"26507","inReplyTo":null,"subject":"Regarding GIT API","fromName":"Abhinav Goyal","fromEmail":"honeykool23@gmail.com","sentAt":"2011-02-15T11:08:14Z","receivedAt":"2011-02-15T11:08:14Z","isPatch":false,"sender":{"key":"honeykool23@gmail.com","avatar":null},"body":"hello All,\n\nI searched a lot but all in vain to find GIT API from which I can call \ngit commands from my C++ Application. I tried my hands on libgit2 but found that\nit deals with very low level git functionality .I just need the git command\nsupport for my C++ application. I have my own reason for not using command\nprompt system call. Please help me if you have any idea regarding API that I can\nuse.\n\n\nthanks and regrads\nAbhinav Goyal\n"},{"id":"161173","messageId":"AANLkTi=eSsxTj4V25a9Lk75NfDZ5S5Ag8A-_mLUQ8dEF@mail.gmail.com","threadId":"26507","inReplyTo":"loom.20110215T120434-373@post.gmane.org","subject":"Re: Regarding GIT API","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2011-02-15T11:21:04Z","receivedAt":"2011-02-15T11:21:04Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, Feb 15, 2011 at 12:08 PM, Abhinav Goyal <honeykool23@gmail.com> wrote:\n> hello All,\n>\n> I searched a lot but all in vain to find GIT API from which I can call\n> git commands from my C++ Application. I tried my hands on libgit2 but found that\n> it deals with very low level git functionality .I just need the git command\n> support for my C++ application. I have my own reason for not using command\n> prompt system call. Please help me if you have any idea regarding API that I can\n> use.\n>\n\nGit's API is constructed through calling the plumbing commands, not by\ncalling C/C++ functions. If you want an example of how to do that, you\ncould look at the git-cheetah source code:\nhttp://repo.or.cz/w/git-cheetah.git\n\nLibGit2 is the most complete alternative for C/C++ to my knowledge.\n"},{"id":"161174","messageId":"1297768932-sup-7106@localhost.localdomain","threadId":"26507","inReplyTo":"loom.20110215T120434-373@post.gmane.org","subject":"Re: Regarding GIT API","fromName":"Marc Weber","fromEmail":"marco-oweber@gmx.de","sentAt":"2011-02-15T11:22:59Z","receivedAt":"2011-02-15T11:22:59Z","isPatch":false,"sender":{"key":"marco-oweber@gmx.de","avatar":null},"body":"Excerpts from Abhinav Goyal's message of Tue Feb 15 12:08:14 +0100 2011:\n> prompt system call. Please help me if you have any idea regarding API that I can\n> use.\nI've no clue but I'd look into qgit or the like which I'd expect to do\nwhat you want if such an API exists.\n\nMarc Weber\n"},{"id":"161176","messageId":"AANLkTim4ucYtoyNEM2+=-dJTmpBtqy1zJOEX3k3Wk+XU@mail.gmail.com","threadId":"26507","inReplyTo":"loom.20110215T120434-373@post.gmane.org","subject":"Re: Regarding GIT API","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2011-02-15T11:49:39Z","receivedAt":"2011-02-15T11:49:39Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Tue, Feb 15, 2011 at 11:08:14AM +0000, Abhinav Goyal wrote:\n> I just need the git command\n> support for my C++ application. I have my own reason for not using command\n> prompt system call.\n\nIf you need full git functionality, currently the only proper way is to\nuse git porcelain command, i.e. run commands using system() and parse\ntheir output. Git porcelain commands are designed to be used in this way,\nso their output is easy to parse. Also, their output should not change\nbetween different versions, in contrast to front-end git commands, which\nprovide more human oriented output.\n\nNOTE: There are libraries for some other languages such as Java and Ruby\n(jGit and Grit correspondingly), but they contain re-implementation of\nmost git functionality. No one has bothered to write anything like that\nin C. So, libgit2 provides only low-level and very limited functionality.\n\nMore information about git interfaces to different languages, you can\nfind here:\n\nhttps://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Interfaces_to_other_programming_languages\n\n\nDmitry\n"},{"id":"161178","messageId":"4D5A744F.5000208@drmicha.warpmail.net","threadId":"26507","inReplyTo":"AANLkTim4ucYtoyNEM2+=-dJTmpBtqy1zJOEX3k3Wk+XU@mail.gmail.com","subject":"Re: Regarding GIT API","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-02-15T12:40:47Z","receivedAt":"2011-02-15T12:40:47Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Dmitry Potapov venit, vidit, dixit 15.02.2011 12:49:\n> On Tue, Feb 15, 2011 at 11:08:14AM +0000, Abhinav Goyal wrote:\n>> I just need the git command\n>> support for my C++ application. I have my own reason for not using command\n>> prompt system call.\n> \n> If you need full git functionality, currently the only proper way is to\n> use git porcelain command, i.e. run commands using system() and parse\n> their output. Git porcelain commands are designed to be used in this way,\n> so their output is easy to parse. Also, their output should not change\n> between different versions, in contrast to front-end git commands, which\n> provide more human oriented output.\n\nYou mean \"plumbing\" for the commands with robust interface.\n\nThe front-end commands are \"porcelain\": they may break when used for\nheavy (scripting) work...\n\n> \n> NOTE: There are libraries for some other languages such as Java and Ruby\n> (jGit and Grit correspondingly), but they contain re-implementation of\n> most git functionality. No one has bothered to write anything like that\n> in C. So, libgit2 provides only low-level and very limited functionality.\n> \n> More information about git interfaces to different languages, you can\n> find here:\n> \n> https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Interfaces_to_other_programming_languages\n> \n> \n> Dmitry\n"},{"id":"161194","messageId":"AANLkTimtiXN5EpejfCSVERCHhc1F7bKQiRNuf7GxbvaR@mail.gmail.com","threadId":"26507","inReplyTo":"4D5A744F.5000208@drmicha.warpmail.net","subject":"Re: Regarding GIT API","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2011-02-15T17:09:40Z","receivedAt":"2011-02-15T17:09:40Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Tue, Feb 15, 2011 at 3:40 PM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n>\n> You mean \"plumbing\" for the commands with robust interface.\n>\n> The front-end commands are \"porcelain\": they may break when used for\n> heavy (scripting) work...\n\nThank you for correction...\n\n\nDmitry\n"}]}