Oddbean new post about | logout
 The prototype I made worked like that but in practice it is quite inefficent and problematic for large repositories with lots of commits.
Its works well for a nostr event to point to one or more git servers to fetch the latest code and exchange proposes patches and related discussion in nostr events.
`ngit send` to share a proposal (patch)
`ngit list` to review existing proposals 
 Is proposal like a synonym for pull request? Where open PR is referring to all the stuff surrounding an unmerged branch?

If there is a list of git servers instead of just one, and you do `ngit init` and `ngit push`, does it create the repo on all the servers? That to me would be the git equivalent of publishing to relays 
 The git servers are only a reference for where someone can get a clone. ngit only publishes Nostr events.

A pull request is directed at a specific repo. A proposal is just a published commit that any repo can pull.
 
 so the protocol doesn't actually cache the diffs in events, only announces them?

oh 🙁  or am i misunderstanding?

do you have to pull the thing from there and then ngit can update from events it finds that populate the tree or? 
 Y'all are starting to ask questions that have me feeling like I need to refer you to my manager. 😂

Ask DanConwayDev 
 well, i would be able to build something out that hosts actual sites and listens to relays and pulls updates, i was just kinda hoping that the events were the content itself 
 Its only the diffs of new proposed changes that get embedded in nostr events. These are proposals which could be submitted by anyone.

To get the full history of commits, use a git server listed in the repository announcement event. 
 A proposal can act just like a PR.
If you run `ngit list` and checkout a proposal it will create a local branch for you.
The author can add extra commits using `ngit push` 
you can run `ngit pull` from local branch and it will pull these extra commits.
 
 `ngit init` doesnt create anything on any git server but just acts as a pointer.
It assumes you have already pushed the repository to those servers.

creates a repo event.