public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
* Announcing gitsync-nncp
@ 2021-08-18 16:16 John Goerzen
  2021-08-18 19:49 ` Jonathan Lane
  2021-08-20 10:41 ` Sergey Matveev
  0 siblings, 2 replies; 5+ messages in thread
From: John Goerzen @ 2021-08-18 16:16 UTC (permalink / raw)
  To: nncp-devel

Hi folks,

There is a reason I have been asking a lot of questions about 
areas lately.  It's that I am now using NNCP to keep git repos on 
three computers in sync with each other.

The program to do this is gitsync-nncp, which you can find at 
https://github.com/jgoerzen/gitsync-nncp

The manual for it, at 
https://github.com/jgoerzen/gitsync-nncp/blob/main/gitsync-nncp.org 
, goes into a lot of detail about the use case and how it works.

I am finding this EXTREMELY slick, better than Dropbox, Syncthing, 
or a pure git server for my use case.

The documentation also highlights a way to integrate gpg with the 
system, if you want another layer of crypto before NNCP for 
whatever reason.

Additionally, as part of the work for this project, I have 
published an article on using NNCP with sudo here:

https://github.com/jgoerzen/nncp-tools/blob/main/docs/nncp-sudo.org

I hope to have time in the next couple of weeks to get NNCP 
working on public-access Unix systems at SDF.org and tilde. 
Additionally, I hope to be able to offer Usenet feeds over NNCP in 
the next month or so.

- John

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Announcing gitsync-nncp
  2021-08-18 16:16 Announcing gitsync-nncp John Goerzen
@ 2021-08-18 19:49 ` Jonathan Lane
  2021-08-18 20:19   ` John Goerzen
  2021-08-20 10:41 ` Sergey Matveev
  1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Lane @ 2021-08-18 19:49 UTC (permalink / raw)
  To: nncp-devel

On Wed, Aug 18, 2021 at 11:16:14AM -0500, John Goerzen wrote:
> Hi folks,
> 
> There is a reason I have been asking a lot of questions about areas lately.
> It's that I am now using NNCP to keep git repos on three computers in sync
> with each other.
> 
> The program to do this is gitsync-nncp, which you can find at
> https://github.com/jgoerzen/gitsync-nncp
> 
> The manual for it, at
> https://github.com/jgoerzen/gitsync-nncp/blob/main/gitsync-nncp.org , goes
> into a lot of detail about the use case and how it works.
> 
> I am finding this EXTREMELY slick, better than Dropbox, Syncthing, or a pure
> git server for my use case.
Interesting.  I have a very similar workflow where I want to keep
working offline with source control across machines, but my solution was
to avoid Git entirely and use Fossil[1] for the project's VCS.  Fossil
has some nice attributes - I can use it in a CVS like mode within my LAN
where the repos all sit on my NAS, and as a DVCS with that LAN node as
one host and my frequently-offline laptop, and my SDF shell, as other
nodes.  The downside of course is that Fossil is not Git, and so if
you're working with Other People's Code or are used to doing frequent
cherrypicks/rebases and other "clean commit history" practices, Fossil
won't work.  My non-version-controlled files I typically just drop in my
Syncthing folder.  Glad to see there's an option for Git users now!

[1]: https://fossil-scm.org/
-- 
tidux@sdf•org
SDF Public Access UNIX System - http://sdf.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Announcing gitsync-nncp
  2021-08-18 19:49 ` Jonathan Lane
@ 2021-08-18 20:19   ` John Goerzen
  0 siblings, 0 replies; 5+ messages in thread
From: John Goerzen @ 2021-08-18 20:19 UTC (permalink / raw)
  To: Jonathan Lane; +Cc: nncp-devel

On Wed, Aug 18 2021, Jonathan Lane wrote:

> where the repos all sit on my NAS, and as a DVCS with that LAN 
> node as
> one host and my frequently-offline laptop, and my SDF shell, as 
> other
> nodes.  The downside of course is that Fossil is not Git, and so 
> if
> you're working with Other People's Code or are used to doing 
> frequent
> cherrypicks/rebases and other "clean commit history" practices, 
> Fossil
> won't work.  My non-version-controlled files I typically just 
> drop in my
> Syncthing folder.  Glad to see there's an option for Git users 
> now!

Interesting, thank you.  I am a bit of a VCS geek, having used 
cvs, svn, arch/tla, darcs, hg, git...  I'm not sure I have the 
bandwidth to learn a new one right now, but I've added to my list 
of interesting things to check out!

- John

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Announcing gitsync-nncp
  2021-08-18 16:16 Announcing gitsync-nncp John Goerzen
  2021-08-18 19:49 ` Jonathan Lane
@ 2021-08-20 10:41 ` Sergey Matveev
  2021-08-20 12:53   ` John Goerzen
  1 sibling, 1 reply; 5+ messages in thread
From: Sergey Matveev @ 2021-08-20 10:41 UTC (permalink / raw)
  To: nncp-devel

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

Greetings!

*** John Goerzen [2021-08-18 11:16]:
>https://github.com/jgoerzen/gitsync-nncp

Impressive! My appreciation!

Just out of curiosity, possibly I read badly and too quickly, possibly I
am not taking in account something, or forget how git works, but: each
remote gitsync-accessible repository is "identified" only by a single
branch in your scheme. Can remote/branch be used instead of a single
branch? Instead of "gitsync-nncp/bob" branch, can there be used
"gitsync-bob" git-remote with possibly several branches in it instead
(and dummy send/fetch URLs)? Git-remote can be considered as a some kind
of a namespace/aggregation of branches (plus some URLs/rules where to
push/fetch it) in my opinion. Or using "git remotes" abstraction brings
more problems and complications? But you won't be limited to the single branch.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Announcing gitsync-nncp
  2021-08-20 10:41 ` Sergey Matveev
@ 2021-08-20 12:53   ` John Goerzen
  0 siblings, 0 replies; 5+ messages in thread
From: John Goerzen @ 2021-08-20 12:53 UTC (permalink / raw)
  To: Sergey Matveev; +Cc: nncp-devel


On Fri, Aug 20 2021, Sergey Matveev wrote:

> Greetings!
>
> *** John Goerzen [2021-08-18 11:16]:
>>https://github.com/jgoerzen/gitsync-nncp
>
> Impressive! My appreciation!
>
> Just out of curiosity, possibly I read badly and too quickly, 
> possibly I
> am not taking in account something, or forget how git works, 
> but: each
> remote gitsync-accessible repository is "identified" only by a 
> single
> branch in your scheme. Can remote/branch be used instead of a 
> single
> branch? Instead of "gitsync-nncp/bob" branch, can there be used
> "gitsync-bob" git-remote with possibly several branches in it 
> instead
> (and dummy send/fetch URLs)? Git-remote can be considered as a 
> some kind
> of a namespace/aggregation of branches (plus some URLs/rules 
> where to
> push/fetch it) in my opinion. Or using "git remotes" abstraction 
> brings
> more problems and complications? But you won't be limited to the 
> single branch.

You are quite right.  Actually Joey Hess (author of git-annex) 
pointed out that git has an entire interface for defining custom 
remotes, at https://www.git-scm.com/docs/gitremote-helpers , 
though it doesn't look to be async-friendly initially.

I just didn't implement all of that because of the complexity, and 
I guess because I didn't need it.  The guts of this thing is about 
160 lines of code and I wanted it to be a simple-ish demonstration 
of using NNCP for a really neat purpose, something that's 
difficult to achieve otherwise.  I initially considered writing 
the thing in Rust and using https://crates.io/crates/git2 , which 
definitely has a number of advantages and would be more suitable 
once we start talking about these more complex kinds of 
scenarios... but 160 lines of code beckoned and I am using it 
quite happily for my own use case already.  I may yet redo it in 
Rust for these sorts of things; I do feel that I'm sort of pushing 
the shell to about the limits of how far it should reasonably go 
already.

- John

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-20 12:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 16:16 Announcing gitsync-nncp John Goerzen
2021-08-18 19:49 ` Jonathan Lane
2021-08-18 20:19   ` John Goerzen
2021-08-20 10:41 ` Sergey Matveev
2021-08-20 12:53   ` John Goerzen