-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check out chrisdickinson's recent work #3
Comments
current working theory:
this also implies:
what does this leave out?
what are weaknesses of the browserify approach?
what are weaknesses in node that make this hard?
my plan for the near future:
|
@chrisdickinson that's really great work. working theory points 2 & 3 I whole heartedly agree with, there is no point using c-git filesystem dir structure for object or metadata storage in browser. But then there's the practical need to actual be able to checkout a working direcvtory which does require something resembling a typical file system. Likewise agree with not needing to use existing index file format, especially given its a binary format that's not especially well documented, but will need to have something similar to allow for staging commits, the index does serve that rather core purpose of preparing what will become the next commits tree and diff'ing current working dir against it. for testing against smart http remotes from a browser, pushover seems a great fit, as it's simple to add CORS support by putting a reverse proxy in front of it or maybe just adding it directly to pushover itself. |
fs-browserify could be useful here, it implements a few of the most common fs operations on top of indexeddb Sent from my iPhone On Mar 31, 2013, at 4:25 AM, Maksim Lin [email protected] wrote:
|
@maks yep, the idea is that the "local checkout" package will be entirely separate from the other packages -- you'll populate it using git-walk-tree. basically, you should be able to use any "local checkout" package that supports being piped to from walk-tree; whether that's backed by plain JS objects, indexeddb, localstorage, requestFileSystem, etc, etc. The other bonus point here is that by making the utility functions agnostic of the ODB being used (and the filesystem), you could actually back this with redis (or some other KV store) on the server. |
I wonder how much value there is in having interop at the level of the actual files in the Also I'm not sure that leaning on browserify is such a good idea if it's shims will make it hard to take full advantage of the native APIs in the browser. I guess it will just depend on what the tradeoffs end up being. Unfortunately I won't be able to start coding on this for a couple more weeks. I do hope that I'll be able to take advantage of a lot of @chrisdickinson's great work. |
For zip and other packaging, what about emscripten / asm.js conversion of zlib? see: https://github.com/richardassar/zpipe |
@creationix Agreed on there not being a huge amount of value for interop at the filesystem level; at best it provides us with test data to feed into the other packages. It shouldn't be the focus (though really, at this point it's 90% done -- both pack and loose odbs are implemented and while it's currently readonly, it's really simple to create loose pack objects). re: browserify's shims: In practice, the buffer shim isn't a huge problem -- it can be mostly solved by converting to typed arrays either on-the-fly (which is what I've been doing thus far) using @kuba-kubula thanks for the link! I recently found (like, last night) that imaya's inflate implementation might not be able to inflate certain decompressed streams (namely, those with predefined dictionaries) so I might try plugging in zpipe instead. If all goes well (and I'm optimistic -- I just got the |
also, in re: the zlib shim not being ideal -- it's fairly easy to swap it out for other implementations using browserify. the harder part is node: its builtin implementation is problematic WRT actually figuring out how many compressed bytes it takes to generate a payload of a given size ): |
ahaha, ignore me! browserify's zlib deals just fine with the data, I was just feeding it bad data. So, imaya's zlib should work. @kuba-kubula looked into zpipe. Sadly, it probably won't work for our purposes:
|
@chrisdickinson you are purely awesome! |
okay, so the inflate implementation is "fast enough" for now -- there are a couple of places where it could be sped up, but it doesn't take an hour to clone "mature" repos now. I've wired it up locally using levelidb for storage. Next steps:
|
I'm travelling all day today (It's Thursday morning in France) I'll be On Thu, Apr 25, 2013 at 7:39 AM, Chris Dickinson
|
@creationix Cool. Welcome back! So, ideally, this repo would provide the following: the project site itself plus possibly a dev blog (as a gh-pages branch), the documentation (which should cover the constituent libraries and give those curious an idea of how it all hangs together), and a porcelain library which should provide similar functionality to the Super ideally, but totally up to you:
|
pretty much agree with @chrisdickinson about a porcelain level library and documentation and "reference" implemenation. Especially for the in-browser use case, I'd imagine that people (such as me) would want to use it directly within a text editor/IDE webapp due to sandboxing, rather than as some sort of stand-alone app like you would on a desktop/mobile os. With different ODBs, @chrisdickinson doesn't your https://github.com/chrisdickinson/git-odb already provide a nice pluggable means of having multiple backends? |
Since we've been working together for the last week and a half and already depend on some of @chrisdickinson's repos, I'm going to close this issue. See new issues for specific tasks. |
apologies if you guys have already discussed this. @chrisdickinson has been working on a js git implementation lately:
https://github.com/chrisdickinson/git-fetch-pack
https://github.com/chrisdickinson/git-walk-tree
https://github.com/chrisdickinson/git-odb
https://github.com/chrisdickinson/git-odb-pack
https://github.com/chrisdickinson/git-packfile
https://github.com/chrisdickinson/git-walk-refs
https://github.com/chrisdickinson/git-parse-human
https://github.com/chrisdickinson/git-transport-protocol
https://github.com/chrisdickinson/git-read-pkt-line
https://github.com/chrisdickinson/git-write-pkt-line
https://github.com/chrisdickinson/git-load-refs
https://github.com/chrisdickinson/git-packidx-parser
https://github.com/chrisdickinson/git-packed-ref-parse
https://github.com/chrisdickinson/git-to-js
https://github.com/chrisdickinson/git-object-tree
https://github.com/chrisdickinson/git-object-tag
https://github.com/chrisdickinson/git-object-commit
https://github.com/chrisdickinson/git-object-blob
https://github.com/chrisdickinson/git-odb-loose
https://github.com/chrisdickinson/git-autoregister-odb
https://github.com/chrisdickinson/git-apply-delta
etc
The text was updated successfully, but these errors were encountered: