Live data from Hacker News

A pure JavaScript implementation of Git for Node and browsers

github.com

1–10 of 203 posts

Re: A pure JavaScript implementation of Git for Node and browsers

#5
I wonder how it works in practice. I've worked with git.js (old and ugly, but works) and js-git (looks nice but is quite complex).

git.js even has a repository browsing demo (think gitk) that works in a browser.

Did anyone use isomorphic git? Does it support smart http protocol?

Re: A pure JavaScript implementation of Git for Node and browsers

#6
I did something similar a few years ago. https://github.com/ryanackley/git-html5.js. A lot of the links don't work in the README anymore. It was more of a "this would be cool!" project rather than a library I wanted everyone to use for the next 20 years.

One of things that scared me is the responsibility that bugs in something like this could be catastrophic to someone's work. As I built my git library I realized a lot of the network protocol validation exists in the git client. For example, one bug I introduced caused a force push of a shallow copy of the tip of master intermittently. The server would happily accept it without any kind of "are you sure?" or -f flag. That spooked me.

Re: A pure JavaScript implementation of Git for Node and browsers

#8
post #7
post #4

"Any application that can be written in JavaScript, will eventually be written in JavaScript." -- Atwood's Law

we should just implement js in js and go full circle already.

There's a bunch: https://github.com/jterrace/js.js/

Re: A pure JavaScript implementation of Git for Node and browsers

#9
post #7
post #4

"Any application that can be written in JavaScript, will eventually be written in JavaScript." -- Atwood's Law

we should just implement js in js and go full circle already.

already done: https://github.com/NeilFraser/JS-Interpreter

Re: A pure JavaScript implementation of Git for Node and browsers

#10
I think it's interesting how there's two phenomena that seem to be related to me that get posted here and seem to get treated with different responses.

One the one hand, we have software originally written in C/C++ being rewritten in Rust (not often, sometimes just conceptualized), and there's often a real push back by some people about how it's a waste and not useful.

On the other, we have software rewritten in Javascript, which people are generally very accepting of, even if they don't plan to use it.

I understand the goals of these are often different, and the benefits are also often different, and they have a different set of use cases, but the reception seems markedly different (at least in tone).

I'm not necessarily trying to imply that means anything, it's just something that struck me while noting we now have Git implemented in JS.

Post reply on HN