-
Notifications
You must be signed in to change notification settings - Fork 25
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
Push #2
Comments
cc @chriscool your insight would be more than welcome here. The 'dumb' remote protocol is only described for fetch/pull in the git book. |
Sounds great to me.
I believe so. see also http://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols
maybe we want to use |
Hey! Thanks for the input but send/receive-pack is modeled around a remote process running on a remote copy. Plus: it's not cleanly separated from the ssh transport. Making it hard to reuse. Luckily, @davidar pointed me to git-remote-dropbox, which works exactly like I wanted it. Dumb protocol, no 2nd repo clone required. I added a simple test that clones, adds a commit, pushes, clones the result and checks if the files are there. More complex usage tests are needed though. I'm sure that deleting a remote ref currently doesn't work, for instance. |
I'd like to have something to push to IPFS without having the repo previously hosted in IPFS… |
Usability weirdness: since you can only update the remote location manually with
Not sure how to highlight this better. (I'll fix colors of the logging but that's only maaaarginally helpful.) |
Now that clone/fetch is working, push is the next step.
For now, I just plan to add commits to a remote, and print the new root hash of that repo. Updating IPNS entries will come later.
I'm also not sure if I can update the local path of the remote that was used after a push. Might need a 'git remote rm ipfs $oldHash && git remote add ipfs $newHash' dance until ipns is added... (dislike..)
For the mechanics: When running
git push
with an ipfs origin, git asks the helper for a list of remote refs (just like with fetch, but with the for-push argument, not sure what that is about)Next, git will send one ore more
push <src>:<dst>
commands.At that point I already know the hash of that remote ref (I just received it myself). I think the idea is, to walk down the history of the local repo (
GIT_DIR
) and find that remote ref. Everything up from that point, are the commits we need to push.Open questions:
.git/object/ab/cdefs..
or do I need to update some index? Refs at least, I guess.ipfs://new
to publish new repos?The text was updated successfully, but these errors were encountered: