libgit2: a Git Linkable Library
One of the long running issues with Git is that the library produced to run the binary is not re-entrant – you can’t link to it from another program because…
One of the long running issues with Git is that the library produced to run the binary is not re-entrant – you can’t link to it from another program because it calls die()
all over the place. Thus, anyone trying to write a GUI or web interface or script for Git has always had to fork/exec a call to the actual Git binary, which is slow and often a poor API (having to parse the text output).
A few years ago Shawn Pearce started a new Git library designed and licensed to be linkable and called it libgit2. This was a great idea, but nobody really ran with it and not much was done on it for several years. Fortunately this year a student choose it for their Google Summer of Code project and for better or worse got me as their mentor.
Well, that student did an amazing job taking the library from being basically unusable to being incredibly useful. His name is Vicent Marti and GitHub has taken over where the GSoC organization left off and has contracted Vicent to continue his great work on libgit2 and its Ruby bindings, the Rugged library.
The projects are still in a bit of flux, but there is quite a lot you can do now and there are bindings for Python in addition to Ruby. If you are interested in using it for something and have any features you would like to see, add an issue to our GitHub project. You can read more about libgit2 at its new website: libgit2.github.com.
A little about Vicent: Vicent Marti is a 20 year old developer born and raised in the Catalan Countries. He is currently working towards his Masters Degree in Computer Science while living in Helsinki (Finland) and trying to cope with the fact that water comes in shapes and forms other than “liquid; in the Mediterranean”. When he’s not working on anything related to indie videogames, he enjoys evangelizing about Git and being an asshole about it.
Written by
Related posts
![](https://github.blog/wp-content/uploads/2023/10/Collaboration-DarkMode-2.png?resize=400%2C212)
2024 is the biggest global election year in history. What’s at stake for developers?
GitHub is considering what is at stake for our users and platform, how we can take responsible action to support free and fair elections, and how developers contribute to resilient democratic processes.
![](https://github.blog/wp-content/uploads/2023/10/AI-DarkMode-2.png?resize=400%2C212)
GitHub named a Leader in the Gartner first-ever Magic Quadrant for AI Code Assistants
This year, as part of its annual Magic Quadrant series, Gartner published a first-of-its-kind report analyzing the state of play in the AI Code Assistants market–and named GitHub a Leader.
![AI in software development 2024 survey results with colorful graphics and percentages.](https://github.blog/wp-content/uploads/2024/08/ai-survey-header.png?resize=400%2C212)
Survey: The AI wave continues to grow on software development teams
We surveyed 2,000 people on software development teams at enterprises in the U.S., Brazil, India, and Germany about the use, experience, and expectations around generative AI tools in software development.