-3

git and libgit2 are separate. What's the history behind them?

They are both C. Why are they implemented on their own instead of sharing any code? Are people planing to consolidate them?

Thank you!

H. Zhao
  • 1
  • 3
  • 3
    This is relevant, although that question was somewhat different: https://stackoverflow.com/a/22097293/3216427 – joanis Oct 14 '22 at 19:44

1 Answers1

-1

Firstly, git is not a library, so it's not suited for integrating into other code as easily.

Secondly, an important difference is the license. Git is distributed as GPL, which means that code that use or link with parts of the git code must also be distributed as GPL. Libgit2 is distributed with a license that permits linking with libgit2 without inflicting on the license of the rest of the application code.

Tomas Skäre
  • 174
  • 5
  • There's no history in your answer. By "consolidate" the most likely plan is to let git to be based on libgit2. And libgit2 being LGPL doesn't invalidate that. – H. Zhao Nov 11 '22 at 05:33
  • I'm not sure what you're getting at. The history is that "git" is the command line tool developed when git was created. Libgit2 aims to provide a stable API to work against git repositories. There is no end goal for libgit2 to replace the git command line tool, they can both exist at the same time and both provide their own use. One is a command line tool, the other is a library. – Tomas Skäre Nov 12 '22 at 06:39