News for hackers. Stuff that matters.
Re:A pure JavaScript implementation of Git for Node and brow... by ronjouch on Wednesday May 16, 2018 @04:17PM (#17086083)
Looking at this rewrite I was wondering, but didn't find an answer in the project README: would emscripten successfully compile Git to js/wasm?
Re:A pure JavaScript implementation of Git for Node and brow... by mr_toad on Wednesday May 16, 2018 @07:19PM (#17087242)
Git has its claws deep in the file system. On the browser side, JS and wasm have very limited access to the file system. You’d need to somehow bridge that gap. (It looks like isomorphic-git is using indexdb, and not the file system).

There’s probably other dependencies (ssh, http, an editor for commits) that need to be resolved to get expected functionality.

Re:A pure JavaScript implementation of Git for Node and brow... by jvilk on Wednesday May 16, 2018 @10:19PM (#17088203)
You're right; when it is running in the browser, isomorphic-git does not have access to the operating system's file system. Instead, it uses BrowserFS [1], which emulates a file system abstraction on top of arbitrary storage backends. It supports IndexedDB, localStorage, and Dropbox, among others. (Disclaimer: I am the author of BrowserFS.)

[1] https://github.com/jvilk/BrowserFS

Re:A pure JavaScript implementation of Git for Node and brow... by viraptor on Wednesday May 16, 2018 @06:28PM (#17086978)
There's still a bit of bash hiding in the git commands if I remember correctly. That wouldn't be trivial to compile.
Re:A pure JavaScript implementation of Git for Node and brow... by iguessthislldo on Wednesday May 16, 2018 @06:46PM (#17087078)
I was going to write: "Simple, we just make a bash compiler", but I realized this might have already been done and to my horror a quick google search confirmed this, or more technically a sh to C transpiler: http://www.linux-magazine.com/Online/Features/SHC-Shell-Comp...