[PoC PATCH JGIT 0/2] Proof of concept code for Git Freenet transport

DORMANTno replies

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

[PoC PATCH JGIT 0/2] Proof of concept code for Git Freenet transport

From: Daniel Cheng (aka SDiZ) <hidden>
Date: 2016-06-15 22:46:21

Hi JGit / Freenet community,

Here is some proof-of-concept code for Git-over-Freenet.
I am sending this to see the feedback from communities.

The code need some more cleanups, so it it is not ready for apply (yet).

This is a real-life example

Push:
   $ git remote add fcp fcp://SSK@[my public key]^[my private key]/test.git
   $ ./jgit push fcp refs/remotes/origin/stable:refs/heads/master
 
 /ALTERNATIVLY/

   Insert a bare repository under USK@<.....>/test.git/-1/

Pull:
 $ ./jgit clone fcp://SSK@[my public key]^[my private key]/test.git


To workaround the metadata update problem, this client translate the
path seperator to "-", that means:

On push:
   objects/aa/bbbbbbbb   --> USK@..../test.git-objects-aa-bbbbbbb/-1/
   refs/heads/xxx        --> USK@..../test.git-objects-ref-heads-xxx/-1/

On pull:
   To support uploading from jSite, 
    when we load the info/refs we first check USK@..../test.git-info-refs/-1/
    if it is unavailiable, we would use USK@..../test.git/-1/info/refs

   The "traditional" type (USK@..../test.git/-1/objects) repository is
   always added as an alternative objects database. No other info/alternatives 
   are supported

FIXME:
 - How to store the private key of repository?
   Currently, we use URI of form fcp://SSK@<public key>^<private key>/some-id
   This is quite ugly. Could we use a per remote Config ? How can I get remote
   name from transport?

 - Make pushing async, could we?

Re: [PoC PATCH JGIT 0/2] Proof of concept code for Git Freenet transport

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:46:21

Hi,

On Mon, 9 Mar 2009, Daniel Cheng (aka SDiZ) wrote:
Hi JGit / Freenet community,

Here is some proof-of-concept code for Git-over-Freenet.
Thanks!

I was talking to some Freenet guys at the GSoC mentor summit 2007, and 
always wanted to give it a try (albeit using C Git, not JGit), but that 
item just got pushed off my TODO list...

Ciao,
Dscho

Re: [PoC PATCH JGIT 0/2] Proof of concept code for Git Freenet transport

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:46:21

"Daniel Cheng (aka SDiZ)" [off-list ref] wrote:
Here is some proof-of-concept code for Git-over-Freenet.
I am sending this to see the feedback from communities.
Interesting!

I'm quite open to bringing this into JGit itself, so long as it
doesn't cause us to import 42 other libraries that we don't need.

:-)
 
FIXME:
 - How to store the private key of repository?
   Currently, we use URI of form fcp://SSK@<public key>^<private key>/some-id
   This is quite ugly. Could we use a per remote Config ? How can I get remote
   name from transport?
Use something like amazon-s3 does, where there is a file path under
~/ specified by the host part of the URI, and store the data there?

I did that rather than storing into ~/.gitconfig or GIT_DIR/config
as the private key really should remain private.  Chmod'ing your
config file to be private is a pain, and "git config" last I checked
wouldn't preserve the permissions when it modified the file for you.

That said, the Transport API in JGit doesn't get access to the
RemoteConfig it was created with, because it isn't always made
from a remote (e.g. you can pass the URIish on the command line).
We could however optionally expose it, but in general I prefer
to make everything that can be obtained via the RemoteConfig be
settable without one, so it can also come through from the CLI
or some higher-level GUI.
 
 - Make pushing async, could we?
I'm not sure I understand that.  Do you want to background the push
task?  Isn't that what your shell is for?  Or do you want to perform
the writes in an async fashion in parallel, to reduce the latency?

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help