3 ms·
The problem with Git is that the software and API aren't separated. Like all modern software, there should be an API or interface to which all distributed sourc
by mikece 7y ago
The problem with Git is that the software and API aren't separated. Like all modern software, there should be an API or interface to which all distributed source control engines comply, allowing the specific DVCS engine to an implementation detail. Want the old-school one written in C by Linus? Fine. Want a revamped version of Mercurial that uses the same commands and creates the same repository format? Cool! Want to Show HN your ability to implement the same thing in Rust with lower memory and better safety? Awesome!
But with Git this isn't possible because there's no concept of the API or interface for distributed version control being separate from the implementation -- and the discussion of "could the API be better than what it is now?" has never been had in a meaningful way.
- crazypython 7y agoIsn't its API the file system layout? I use GitUp, which interacts directly with the .git/ folder.
- orf 7y agoThere is, it's the .git directory. Both the protocol and the directory are well specified. See libgit2 for an example non-reference implementation. I think someone even built an implementation in bash, but I can't seem to find it now.
- Iwan-Zotow 7y ago> I think someone even built an implementation in bash, but I can't seem to find it now. someone named Linus, I guess?
- orf 7y agoNo, it was someone exploring git internals by writing a simple git implementation in bash.
- augusto-moura 7y agoOf course it has, the other implementation that comes to mind now is JGit [1], a git implementation in Java. A lot of IDEs, build plugins are using it for interfacing with git without the mess that is JNI [1]: https://www.eclipse.org/jgit/ https://www.eclipse.org/jgit/
- u801e 7y agoGit has a low level plumbing layer and a high level porcelain layer. The design allows for writing alternative porcelain layers. I believe magit is an example of this.
- icholy 7y agoGo has a pretty solid git implementation https://github.com/src-d/go-git https://github.com/src-d/go-git