3 ms·
It's amazing how git is a distributed system, but everybody chooses to use it in a centralized manner with PRs (mostly on GitHub). BTW GitHub is having issues
by palata 3y ago
It's amazing how git is a distributed system, but everybody chooses to use it in a centralized manner with PRs (mostly on GitHub).
BTW GitHub is having issues today.
- japanman185 3y ago[dead]
- chaxor 3y agoIt would be wonderful if it were distributed by default more easily. For instance, an ipfs or torrent backend which automatically provides a backbone of thousands of computers with the repo on them as the remote, rather than just the single github server. Ipfs remote for git should be the default.
- wepple 3y agoHow reliable is IPFS for things like this? If I wanted to use git on ipfs, I could host a node and push all my git commits there, but I’d have to convince others to host it as well, correct? So perhaps it would be awesome for majorly popular projects, but still a end up having a SPOF for smaller projects right?
- chaxor 3y agoThe idea is to have the daemon automatically start and serve the git repo anytime a git clone is done, that way the number of nodes hosting the repo (speed of download) grows with the popularity of the repo. That way you could saturate a 10G connection on a popular repo, whereas with github you'll likely be pretty throttled or limited.
- palata 3y agoIt was designed around the email workflow, which is distributed by default: you send your patches to a mailing list, which is distributed between all the email servers and clients. And it's easy to host mirrors, too. GitHub and the PR workflow tend to make it all centralized.
- chaxor 3y agoSure, but the work of typing out 1000 people's IP addresses as remotes and managing that sounds like a nightmare that should be offloaded somehow. Adding "ipfs" to the remote and having it managed by a system to push to thousands of devices (however many have cloned the repo) is much more concise and simple.
- palata 3y ago> the work of typing out 1000 people's IP addresses as remotes and managing that sounds like a nightmare Not sure I get that. You do `git send-email --to=<mailing-list-address>` and that's it. Everyone on the mailing list gets a copy of your patch, that they can apply if they want.
- chaxor 3y agoWow, perhaps I am unaware of some of the wonderful capabilities of git! So if everything on the entirety of github.com was deleted, you could still do a git clone somehow and it would pull it from everyone who has ever cloned that repo? Because that's what I'm referring to here - p2p not hub-spoke architectures. I'm fairly certain git doesn't inherently have this feature, unless the backend remote could automatically start an iOS or torrent daemon and deal with torrent or ipfs for pulling and pushing.
- palata 3y agoI am talking about the collaboration process: sharing patches with collaborators. I think you are talking about distributing the git server itself over p2p. Which I find less important because I don't think that the server bandwidth is usually a problem. Or is it?
- Double_a_92 3y agoHow would that even work without merging all the relevant changes at some point? If I want to use some open source software, I don't want to connect to every single forked repository to see if they might have local changes that I could need. ... and then dealing with all sorts of merge conflicts.
- palata 3y agoOf course, at some point you probably want an authoritative main branch from which you make your releases (though there can be forks, too). I meant more in terms of development. The way git is used most of the time is by having a main branch on GitHub, that contributors clone, work on a feature branch, then make a PR, have QA test it, and merge it. If that cycle is too slow, many times the devs will start complaining because they are "stuck until the branch is merged". Because the assumption is that everybody branches from the main branch. But git was designed around the email workflow. Instead of a PR, you make a patch (or a group of patches), that you can share with others. For instance, you can share a patch with a colleague from your team, who will review it and incorporate it in their branch before it gets merged into main. That way they are testing it by using it. At some point your changes get merged into the main branch, and your coworkers can just apply their patches on top of it. We can imagine a workflow with a hierarchy of maintainers: devs at the lower level send patches to their supervisor, who after a while sends them up to their supervisor, up to the main branch. PRs flatten all that. Devs typically never learn how to deal with patches, and the review process ends up being "rebase on main, run the CI, then I'll skim through your code, I'll complain about some variable names and I'll approve without even pulling your code" (I'm exaggerating a bit, of course). I think there is a lot of value in learning the git email workflow. This post (not mine) is about this: https://web.archive.org/web/20170823054920/https://dpc.pw/blog/2017/08/youre-using-git-wrong/ https://web.archive.org/web/20170823054920/https://dpc.pw/bl... And of course SourceHut (https://sourcehut.org/ https://sourcehut.org/, not mine) is a great forge built around the email workflow.
- avgcorrection 3y ago> I meant more in terms of development. The way git is used most of the time is by having a main branch on GitHub, that contributors clone, work on a feature branch, then make a PR, have QA test it, and merge it. If that cycle is too slow, many times the devs will start complaining because they are "stuck until the branch is merged". Because the assumption is that everybody branches from the main branch. That my VCS is distributed is a goes-without-saying at this point. Nothing else is good enough. But a completely different dimension is integration. And I want to be as integrated as possible. And for everyone else as well. I don’t want three different cliques working on disparate things. And I warn against such things at work as well (i.e., hey let’s make a branch for this project which 3/9 of us is going to work on for a month...). > But git was designed around the email workflow. Instead of a PR, you make a patch (or a group of patches), that you can share with others. For instance, you can share a patch with a colleague from your team, who will review it and incorporate it in their branch before it gets merged into main. That way they are testing it by using it. At some point your changes get merged into the main branch, and your coworkers can just apply their patches on top of it. This certainly has merit. I mean peer-to-peer integration branching. But you can do the same with forges and branches. In fact it’s more difficult to keep track of patches via email, i.e. what comes from where, have I included this already, etc. Just consider the conversations that seem to keep coming up on how to deal with identifying patches.[1] > We can imagine a workflow with a hierarchy of maintainers: devs at the lower level send patches to their supervisor, who after a while sends them up to their supervisor, up to the main branch. I mean you should expect Whatever The Law about the org hierarchy being reflected in processes, not vice versa. Apparently there isn’t a process for this command hierarchy to be reflected in. > PRs flatten all that. Devs typically never learn how to deal with patches, and the review process ends up being "rebase on main, run the CI, then I'll skim through your code, I'll complain about some variable names and I'll approve without even pulling your code" (I'm exaggerating a bit, of course). Patches or not doesn’t really change that. If one single email thread becomes the focal point of a month-long development “PR” then that’s the same thing. But yes. Getting out of that dang “fork” mindset is good. You can be more loosey goosey via email since you just inline your suggestions as patches (either with a commit message or without). [1] https://lore.kernel.org/git/bdbe9b7c1123f70c0b4325d778af1df8fea2bb1b.camel@that.guru/ https://lore.kernel.org/git/bdbe9b7c1123f70c0b4325d778af1df8...
- colonwqbang 3y agoPRs are decentralised. Everyone has their own "fork" of the repo, makes changes there, then tries to convince the maintainer of the "main" repo to pull. This is exactly what the decentralised model was meant to do. It doesn't mean that every copy of the repo is equal in importance, but they are equal in functionality. (Or, maybe you mean that it's "centralised" in the sense that it's all on github.com?)
- palata 3y agoWell the git repo is decentralized (everyone has a copy of it). PRs are not. All the PRs are living on one centralized server (usually github.com), such that if that server is down, nobody has access to the PR. When you send your patch to a mailing list (with `git send-email`), then that patch is immediately distributed to all the mail servers. This is decentralized: everyone gets a copy of your email (which is the equivalent of a PR in the email workflow). > Or, maybe you mean that it's "centralised" in the sense that it's all on github.com? That's the other thing: the PR workflow tends to naturally push towards a monopoly. It is annoying to have to create an account on every GitLab instance under the sun just to send a PR. More and more, if your project is not on GitHub, people will not bother to create an account for you. With the email workflow, you don't need an account: you just send your email to the mailing list (you don't even have to subscribe to the mailing list) or to whoever you want to send it. This makes it much easier to deal with different servers (contributing to 100 projects on 100 different servers does not makes you create 100 accounts).
- colonwqbang 3y agoI see your point. Do you think some kind of federation could help here? If there were 10-100 different github-like servers all set up to "git pull" from each other, would that make it a decentralised system to you? Even email is not fully decentralised anymore since we need to use a proxy to send email nowadays.
- palata 3y agoI read that Gitlab is working on some kind of federation of instances, where one could fork a repo from instanceA into instanceB and open a PR from instanceB to instanceA (instead of having to create an account on instanceA and fork the repo there). I guess it would be good if it helped against this "lock-in" effect that pushes everybody to GitHub. Though I doubt GitHub would ever federate (obviously) and another lock-in factor is that people are used to the GitHub tooling and may be reluctant to use a different WebUI just for a few projects. But that all sort of feels overly complicated to me, to be honest. Because the email workflow already solves that in a minimal way. I can send patches to any email address I want without creating an account, and I can use my favourite tools everywhere without even needing a browser. I like minimalistic solutions :-).
- 8organicbits 3y agoI used a pull request over emaila workflow at my first job ~14 years ago. This is decentralized as email is decentralized. It works quite well, but I prefer the centralized tools. Linux development is the most public example of this, here's an example from today: https://lore.kernel.org/linux-block/20240109071332.2216253-1-yukuai1@huaweicloud.com/T/#u https://lore.kernel.org/linux-block/20240109071332.2216253-1...
- palata 3y agoDo you know SourceHut? https://sourcehut.org/ https://sourcehut.org/ I would be really curious to have your opinion about it as compared to how it was 14 years ago. I feel like SourceHut does a really good job helping on the tooling side (it's super easy to setup a mailing list). Also I find Aerc very cool for that. The author describes it here: https://drewdevault.com/2022/07/25/Code-review-with-aerc.html https://drewdevault.com/2022/07/25/Code-review-with-aerc.htm...
- 8organicbits 3y agoI haven't used it, but I'm watching the progress. I really like that you can collaborate even if you don't have an account. Unfortunately, all my projects require tools that claim to be past "alpha" status, so I can't consider it yet.