Git is designed for plumbing and porcelain. Plumbing components form the basis of a low-level system: managing objects, repositories, remotes, etc. Porcelain, on the other hand, means more comfortable high-level tools that use plumbing.
Historically, only the most basic / critical elements (mainly plumbing) were implemented in C, the rest used shell / perl scripts. To be more portable, more and more code was rewritten in C.
Against this background, I would recommend just using the system calls for the git executable for your python packaging. View your code as part of china git. Compared to using a specialized library:
PRO
- No need to learn the API - use
git commands that you are familiar with - A complete set of tools - you can use porcelain and not be limited to low-level functionality
CONTRA
- You need to analyze the command line output from
git calls. - May be slower
source share