Hacker News new | ask | show | jobs
by masklinn 2615 days ago
> which may have beaten any HgHub simply because Git has an actual API

Git doesn't though. A bunch of shell scripts calling shell scripts calling a few native binaries is pretty much "use subprocessing". libgit came much later, it wasn't part of the original git.

However what git did provide was an open, stable, fairly simple and officially supported physical model with which you could easily interact directly, and protocols which either worked on that (file and "dumb http") or a relatively simple exchange protocol (the "pack protocol" https://github.com/git/git/blob/9b011b2fe5379f76c53f20b964d7...).

Hell, if anything hg's always provided more API than git, the extension model wouldn't be possible without it e.g. stdout coloration could be an hg plugin while it had to be implemented in each git command.

1 comments

It looks like you're right about the history. According to the git repo, libgit's first commit was in October of 2008 while Github was incorporated in early 2008 (according to Wikipedia).

Github's popularity was probably due to Git's popularity in the Ruby community which may have been due to the official support of the physical model and simple protocols.

That said, an "officially supported physical model" is an API even if I originally had libgit in mind. Also, none of this invalidates the broader point, which is that Git won because of Github, not because of user experience.