Subject: APIs for automatic patch generation

From: Markus Elfring <[email-masked]>
Date: Sat, 20 Feb 2010 20:40:40 +0100

Hello,

I would like to generate patches in the Git format for some other
software automatically. Which application programming interfaces do you
recommend for this purpose if I am going to integrate this into a small
C++ class library?
http://www.kernel.org/pub/software/scm/git/docs/v1.7.0/technical/api-index.html
http://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools

Specific use cases:
- Which functions or commands should I call to retrieve the required
informations for a line like "index 8d16832..358c98b 100644"?
- Can any functions help to construct proper range specifications for
difference hunks?

Regards,
Markus