{"thread":{"id":"22742","subject":"APIs for automatic patch generation","startedAt":"2010-02-20T19:40:40Z","lastAt":"2010-12-13T16:00:30Z","messageCount":6,"participants":["Markus Elfring","Sverre Rabbelier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"135182","messageId":"4B803AB8.30304@web.de","threadId":"22742","inReplyTo":null,"subject":"APIs for automatic patch generation","fromName":"Markus Elfring","fromEmail":"markus.elfring@web.de","sentAt":"2010-02-20T19:40:40Z","receivedAt":"2010-02-20T19:40:40Z","isPatch":false,"sender":{"key":"markus.elfring@web.de","avatar":null},"body":"Hello,\n\nI would like to generate patches in the Git format for some other\nsoftware automatically. Which application programming interfaces do you\nrecommend for this purpose if I am going to integrate this into a small\nC++ class library?\nhttp://www.kernel.org/pub/software/scm/git/docs/v1.7.0/technical/api-index.html\nhttp://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools\n\nSpecific use cases:\n- Which functions or commands should I call to retrieve the required\ninformations for a line like \"index 8d16832..358c98b 100644\"?\n- Can any functions help to construct proper range specifications for\ndifference hunks?\n\nRegards,\nMarkus\n"},{"id":"135438","messageId":"4B840AA2.3010604@web.de","threadId":"22742","inReplyTo":"4B803AB8.30304@web.de","subject":"Re: APIs for automatic patch generation","fromName":"Markus Elfring","fromEmail":"markus.elfring@web.de","sentAt":"2010-02-23T17:04:34Z","receivedAt":"2010-02-23T17:04:34Z","isPatch":false,"sender":{"key":"markus.elfring@web.de","avatar":null},"body":"Hello,\n\nThe commands \"git diff\" and \"git format-patch\" contain functionality that I\nwould like to reuse for my little application in a C++ class library.\n\nWhich functions exist in a C API that can provide the following data?\n- a line like \"index 8d16832..358c98b 100644\"\n- range specifications for difference hunks\n- mail construction\n\nRegards,\nMarkus\n"},{"id":"135439","messageId":"fabb9a1e1002230907u6471efa5w234a5dabfa4ba5e1@mail.gmail.com","threadId":"22742","inReplyTo":"4B840AA2.3010604@web.de","subject":"Re: APIs for automatic patch generation","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-02-23T17:07:13Z","receivedAt":"2010-02-23T17:07:13Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Tue, Feb 23, 2010 at 18:04, Markus Elfring <Markus.Elfring@web.de> wrote:\n> The commands \"git diff\" and \"git format-patch\" contain functionality that I\n> would like to reuse for my little application in a C++ class library.\n\nUntil libgit2 is done, just shell out and call 'git format-patch'.\n\n[0] http://git.wiki.kernel.org/index.php/SoC2010Ideas#libgit2\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"135444","messageId":"4B840EF5.2090306@web.de","threadId":"22742","inReplyTo":"fabb9a1e1002230907u6471efa5w234a5dabfa4ba5e1@mail.gmail.com","subject":"Re: APIs for automatic patch generation","fromName":"Markus Elfring","fromEmail":"markus.elfring@web.de","sentAt":"2010-02-23T17:23:01Z","receivedAt":"2010-02-23T17:23:01Z","isPatch":false,"sender":{"key":"markus.elfring@web.de","avatar":null},"body":"> Until libgit2 is done, just shell out and call 'git format-patch'.\n\nThanks for the link.\n\nI do not need the whole functionality of these commands for my library. I am\nlooking if the mentioned data items can also be really retrieved by command line\nparameters.\n\nRegards,\nMarkus\n"},{"id":"135448","messageId":"fabb9a1e1002231007p650d78fere904f6e5572b12d@mail.gmail.com","threadId":"22742","inReplyTo":"4B840EF5.2090306@web.de","subject":"Re: APIs for automatic patch generation","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-02-23T18:07:10Z","receivedAt":"2010-02-23T18:07:10Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Tue, Feb 23, 2010 at 18:23, Markus Elfring <Markus.Elfring@web.de> wrote:\n> I do not need the whole functionality of these commands for my library.\n\nMy answer still holds.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"157963","messageId":"4D06431E.5020906@web.de","threadId":"22742","inReplyTo":"4B840AA2.3010604@web.de","subject":"Re: APIs for automatic patch generation","fromName":"Markus Elfring","fromEmail":"markus.elfring@web.de","sentAt":"2010-12-13T16:00:30Z","receivedAt":"2010-12-13T16:00:30Z","isPatch":false,"sender":{"key":"markus.elfring@web.de","avatar":null},"body":"> The commands \"git diff\" and \"git format-patch\" contain functionality that I\n> would like to reuse for my little application in a C++ class library.\n\nWhich functions exist in the recently published C API \n(http://libgit2.github.com/) that can provide the following data?\n* a line like \"index 8d16832..358c98b 100644\"\n* range specifications for difference hunks\n* mail construction\n\nRegards,\nMarkus\n"}]}