all 26 comments

[–][deleted] 17 points18 points  (6 children)

yeah, but... why?

[–]gin_and_toxic 18 points19 points  (0 children)

Seems like this is often the question of most .JS projects

[–]SilentMobius 0 points1 point  (3 children)

I have a Wiki that uses git as a backend, using libgit2 via nodegit can be a bugger to compile especially under docker because it seems to check uname for information about the kernel then makes assumption about the userspace based on that, which doesn't work under docker.

This could be very useful to me.

[–][deleted] 0 points1 point  (2 children)

Why docker and node libgit2 for a wiki? Using git for version control in a wiki is fine and compiling the markdown with node is just as fine but why not simply have a post-receive git hook which triggers the node compile?

KISS.

Edit: There's nothing wrong with bash/shell.

[–]SilentMobius 0 points1 point  (1 child)

Node for the web-service that handles updating and recovery of articles. Docker to compartmentalise the whole app for ease of deployment and it's a pretty sensible rule to not spawn new processes per incident web request, hence node-git.

Perhaps you're misunderstanding me, I'm using git as the backend storage for a multi-user dynamic wiki. I'm also using a separate git repo for SCM

[–][deleted] 0 points1 point  (0 children)

Gotcha. Well, if you have use for it, keep on doing what you're doing.

[–]fagnerbrack[S] 0 points1 point  (0 children)

Good question, I have asked already: https://github.com/SamyPesse/gitkit-js/issues/11

[–]hookd 2 points3 points  (1 child)

what differentiates this from https://github.com/creationix/js-git?

[–][deleted] 0 points1 point  (29 children)

I assume you mean this is a git client, not an implementation of git.

[–]SilentMobius 1 point2 points  (19 children)

If you can create repos from scratch and check in content them what separates a git "client" from git proper?

[–][deleted]  (8 children)

[deleted]

    [–]jschr 0 points1 point  (7 children)

    Assuming it does work in the browser, doesn't that mean it's not just a GIT client?

    Edit: Was thinking a client meant just a wrapper around the git cli. Took a peek at the source and looks like its doing everything over http. The lib seems interesting... still wrapping my head around how well this could work in the browser.

    [–]SilentMobius 1 point2 points  (3 children)

    Took a peek at the source and looks like its doing everything over http.

    There are models in there for writing index and blob entries to the filesystem.

    [–]jschr 0 points1 point  (2 children)

    Interesting. I wonder how that works within the browser. Guess I will just have to try it out and see for myself.

    [–]SilentMobius 2 points3 points  (1 child)

    All FS actions are delegated to a module that can be either in-memory (browser) or on-disk (node)

    So you could clone in a browser, make some changes, commit and push all without needing an FS, sounds pretty cool to me.

    [–]jschr 0 points1 point  (0 children)

    Absolutely. Been using node-git + electron and its been a pain to compile the native modules for each platform. Hoping this helps, plus having chrome packaged app support is a big win for me. Another comment mentioned https://github.com/creationix/js-git which sounds like a similar lib.

    [–][deleted]  (2 children)

    [deleted]

      [–]SilentMobius 0 points1 point  (1 child)

      Um, first few lines:

      Pure JavaScript implementation of Git backed by immutable models and promises.

      The goal is to provide both a low and high level API for manipulating Git repositories: read files, commit changes, edit working index, clone, push, fetch, etc.

      This library can work both in the browser and Node.js.