210 points · by pabs3 · 5y ago · 175 comments
- there is no included history. You need to manually download hand-crafted archives from a bespoke endpoint but then you need to import it all. If you want to quickly read some old message there needs to be a relay to a public inbox type of thing which is a hack
- mailing lists software exist but they are another hack. There is no standard for subscribing or unsubscribing
- projects often have multiple lists anyway so they need to install them all
All of these issues are solved with a network of NNTP servers, and even more: automatic backup of posts because that's how NNTP works, messages are shared accross the network so every message has a specific URI (https://tools.ietf.org/html/rfc5538) and can be addressed directly and retrieved on-the-fly if needed
> - mailing lists software exist but they are another hack. There is no standard for subscribing or unsubscribing
There is a standard for unsubscribing: https://tools.ietf.org/html/rfc8058
And for subscribing, you can often open a mailto: link.
Gmane was relatively popular, and it was great but went down for a long time, which probably further obscured NNTP. IDK if everyone who used to use it is aware that it's up again, now at http://gmane.io/
Thunderbird works on most platforms.
> Gmane was relatively popular, and it was great but went down for a long time
Some mailing lists are now archived using public inbox[1]. There are several ways to access it including via NNTP.
Can you get your own mailing lists on public-inbox, or would you have to self host? I'd love to self host git and a mailing list but setting up mailman/sympa/etc. seems to be too big a task. I was thinking setting up a wiki as a replacement for my small personal projects...
If they were to switch to NNTP, they would either have to:
1. Create a new group on usenet (and have to somehow filter out all the spam posted to it or everyone will have to keep their NNTP client kill file up to date)
or
2. They each would have to host their own NNTP server and each one would have to add enough peering servers (incoming and outgoing) to ensure that articles are propogated to them and articles they post are propagated to others
or
3. The maintainer would have to set up a authoritative NNTP server and allow read access, but then have to add accounts for those who need write access (in order to allow them to submit patches).
Continuing to use SMTP allows them to essentially choose option 2, but not have to set up peering servers since DNS MX records handle propagating the emails they send.
That said, having a NNTP mirror of a mailing list like gmane[1] and public-inbox[2] provides the best of both worlds. You get the benefits of NNTP for reading the mailing list, but get the benefits of propagation via SMTP.
What we almost need is an NNTP 2.0 that makes it easier for smaller federated groups. (Maybe this is a good use for ActivityPub and/or Matrix?)
(Public-Inbox is new to me and at first skim seems to cover some interesting bases here. I'm not thrilled at the AGPL licensing though.)
We've had that with XMPP and Publish-Subscribe for years: if the project has a server with this XEP enabled, any authorized user (registered anywhere) can post any type of content.
But public-inbox goes way further with other means of pulling, and the easy and trusted replication gives it the same status as the code: the repo is the source of truth, not the email endpoint. I could see projects using that and, say, gitolite as the two main bricks for running a project. Now all we need is a simple CI/CD system that is designed to run on its own rather than in a specific ecosystem
This is definitely talking from someone who never had to write software that deal with emails. The reality with emails ? They are an horrible format. There is several RFC describing the "email" format, the usual reference is rfc2822, but technically, you can find other rfc that relate to it (ex, the MIME rfcs: RFC 20452, RFC 20463, RFC 20474, RFC 20485, RFC 2049, RFC 68388, RFC 4289, ...). There is a lot that left to be desired in those RFC in term of specifications. They tend to gloss over some part and also allow several format for retro-compatibility.
But then, even the part that are clear and well defined are not respected. I wrote software that dealt with emails for a company that receive several thousands emails on several mailbox everyday. The number of non-complying email that we received that broke our implementation was staggering. Nobody respect the date format, that is standard any more. Then we had some weird stuff, like fields that were mime-encoded even though the spec explicitly say it must not be, attachment metadata that were written completely wrong, headers that made no sense, ... And this was not from your small email provider, it was emails that were coming from a gmail mailbox, outlook, yahoo, ...
Oh and MIME is the best footgun in existence. It allows you to do anything and so of course, you receive anything, including mail-in-mail-in-attachement-in-mixed-content-in-multipart. And you better hope that the boundary are not bugged.
I wrote HTTP servers, IRC clients, BMP parser, and many more format. Nothing ever came close to the mess that is email. Anything is better than email, that is not the clients fault, it's the format fault. We just keep using it because of network effect. But you can bet that any other communication protocol / format sucks less than email.
It's an unfortunate quirk of how the internet has developed that email has stuck around, like postal mail, as long as you put the correct address on the outside of the envelope, you can put almost anything inside.
RFC 822 makes it clear this is a feature:
> In this context, messages are viewed as having an envelope and contents. The envelope contains whatever information is needed to accomplish transmission and delivery. The contents compose the object to be delivered to the recipient. This standard applies only to the format and some of the semantics of message contents. It contains no specification of the information in the envelope.
The format / protocol do impact and limit what the client can do. In a funny way, thanks to MIME, you can technically do whatever you want with emails, but that will be a poorly organized and structured whatever. In many way, emails are like HTML : A way to present information, not to structure and/or organize it. And therefore, there is only so much the client can figure out about the email. Thanks to Thread-id and the recipient list, you can group emails more easily and more relevantly, but that is about it.
Otherwise, yes, email message format is a mess. I also had a pleasure of writing a MIME mail message parser in C. But it was quite fun to try to do it in streaming fashion with no dynamic memory allocation allowed.
My take way is I have no idea how on earth people have actual working IMAP implementations.
I'm not sure why you say emails are hard to search. Extract the text and put it into an engine like lucene. There are the usual small corpus problems, but these aren't dependent on format.
As threads are fundamentally a graph, so complaining that the structure matches the structure of the data is... Odd.. to me.
Including the time zone in the date is a small wart. Add an extra specifier to the format string and move on. Base64 is similar: a bit annoying, but decode and move on. And use RFC1652.
Traditional email threading was based on the contents of the In-Reply-To and References headers. The algorithm is described in RFC 5256 for the IMAP SORT and THREAD extensions[1] and used in several mail user agents[2].
>RFC 68388
what are these numbers, I don't recall RFCs going into 5 digits yet
I do also like being able to update an existing PR as I'm making rapid changes though, and just pushing up to whatever branch my PR references is also really nice. (It's, what, 5 keystrokes to push my latest changes to my remote for that branch? And that's assuming I don't already have the git status buffer open.)
Applying a PR is also straightforward, which matters especially for newer users. Uh, you press a button.
I'm all for decentralization, but this is the UX you're up against.
I agree - there's a bit of a setup phase, stemming a from email having degraded into "that thing you see on gmail.com". https://git-send-email.io/ is nice for validating the setup when in doubt.
However, once the flow runs, I think it's more straight forward than a pull-request workflow.
> I do also like being able to update an existing PR as I'm making rapid changes though
Rapid changes to a PR is bad etiquette. Submit a PR for review, await comments, when received, prepare fixes and submit a new iteration.
Submitting changes after opening a PR that isn't to just to fix CI results is just noise, and suggests that you erroneously opened a PR for review before you were ready for review. Submitting changes little by little likewise suggests that you're still working on an open PR, making noise and and making it hard to see when I should resume my review.
Don't push anything to a PR you don't want me to review and merge. Hold off until then.
> Uh, you press a button.
Yeah, it's easy, but that button has lead to so many bad git habits. Including, say, not caring about their git history and expecting the reviewer to squash everything into ugly commits.
I think this depends a lot on context. GitHub now lets you open "draft" PRs, which are explicitly unmergeable until you mark them as ready. If I'm unsure of the approach I'm taking, it's helpful to be able to show my team what I have and ask for feedback before I've done the work to polish it to a mergeable state.
Surely I'm not the only one who finds this useful, or the feature wouldn't exist.
Furthermore, it's also helpful when collaborating on something that's not code via a PR. For example, I've used git to collaborate on documents; as far as I'm concerned it's much better to have a tight feedback loop between the comments I receive and the edits I make to the document. There's not one "right" way to word things, and I'm not necessarily the only one working on that document, I just happened to be the one to start it; allowing other people to suggest small edits to the document piecemeal more closely matches the kind of collaboration I'm actually looking for.
It's great to see GitHub add this as a real tool now, but there's always been lots of good reasons to open PRs early, evolve them rapidly with discussion, and merge them only once discussion converges. It can be a useful workflow for some types of teams.
There are a couple things I strongly dislike about Github though. Number one: the default commit history display with commits force-linearized by date, which is just messed up and wrong when actual Git history can only be properly modeled with a topological view revealing branch lines of development. Give me `git log --graph`!
To them the timeline is just a linear sequence of what everyone has been working on recently, mixed together. They do understand feature branches, but then they randomly merge their branches in progress and the result is still a mess somehow.
To me, seeing the `git log --graph`, it's a difficult to understand mess with redundant micro-branches and micro-merges. Randomly unrelated file changes and even file deletions also occur - `git commit` might as well mean "copy my working directory into the repo". As a result, the main branch quality varies and cannot be trusted from one day to the next.
The difference between us is I actually look at the repo history, I look at my commits before I commit them. They appear to commit things without even knowing what's going in, and don't look afterwards, as it's a surprise to them when I complain about things like a file deletion.
GitHub's commit history view is part of the problem, because its presented as if it's the main, primary way to look at the history. It's not the problem, but it makes things worse. Better visualisation tools would help, but for now everyone has their own "pet way" of using Git, I lack the social capital to convince anyone to do better, and the gravity of GitHub as "the way" makes it difficult to get anyone to care about any alternative way of viewing the repo. "It's what everyone uses".
GitHub issues similarly suck as a project management tool; guess what we're using.
You might think about investing in a copy of a client that puts the graph up front for that developer, such as GitKraken.
Though I've actually had good success with a tool that is free and already out of the box in most git installs: gitk. gitk is ugly, but it gets the idea across and is easier to teach most developers to use than trying to get them to remember to add the --graph flag to git log. (Though adding a good alias for `git log --graph` or some further relative like `git log --graph --oneline` and encouraging them to use the alias instead is also another option.)
<rant> Every time I see people doing a dance and paising billion dollar companies like netflix, uber or deliveroo, I check them out, realise that they lack most essential functionality:
Deliveroo didn't have Search(!) For restaraunts for like a year
Netflix will sell you a 4K plan, but if your system has 4K screen but does not satisfy their '4K requirements' it won't tell you that you aren't gonna get 4K or what you are missing.
Uber outright used to lie about time to arrive, in London all taxis were always 4 minutes away.
So I I often wonder, we pulled resources and finance in billions across the world, and this is the best we can do?
The two are not mutually exclusive. You can have branches locally with the changes you're interested in and create patches from master to the tip of your branch. Same as a maintainer: you can apply patches in a different branch, check everything is alright and then merge it
Patches only live in the mailing list and are not supposed to be manually handled on your machine
The problem is that I am often browsing the history of repositories hosted on Github via the Github web interface, along with other interactions such as searching through issues and PR history. Cloning a repo to my local machine and firing up gitk is a pretty inconvenient interruption of the web browsing experience.
So if someone wanted a review of some changes all that was necessary was to push their current status to a tag, which is a single command in git. No git-send-mail setup needed.
It was quite nice middle ground, and didn't require me to use github/gitlab GUI. Being able to stay in neomutt for most communications was nice.
Look at the examples on sourcehut.
Yes, it takes a moment to get used to something different, but that's a human problem.
In any case, I tick only one of those boxes as I use a lot of cli tools (including git of course), aggressively unsubscribe anything that looks like a mailing list (never had the patience for the low signal to noise ratio and horrible UX of having to mentally parse deeply nested threads). NNTP was always superior to that and the last time I worked with that is 15 years ago.
I have not used a cli email client since the mid nineties. I considered outlook express to be an upgrade back then. And that wasn't all that great if you think about it. I also used Thunderbird for a while until dropping the notion of having offline email archives on my laptop/computer entirely. These days I use gmail, slack, and a lot of other chat tools. All cloud based stuff. Mostly work related emails are very limited and restricted to interacting with non technical people and alerts/notifications. It is not part of any technical process I've used in the past decade.
I actually used git apply patch back in the day when I was transitioning from subversion to git and was stuck in a team insisting on subversion. Pretty cool way to move commits around and it allowed me to work around some limitations with git-svn (no rebases in svn); but not for everyone.
The nice innovation of the pull request by Github achieves a similar flow but with a pretty UI, easy to use tools for commenting, line by line review, search, issue tracker integration, and a bunch of other things that IMHO stopped being optional on most projects. I kind of like the traceability of PR #4 closes issue #13 and successfully cleared CI & received a positive review so it is safe to merge.
Kernel development has historically catered to the needs of the core committers, most of which have been working on this project for decades and one of which happens to be the inventor of Git. And of course anything kernel related tends to be very cli centric to begin with. And finally they do process a very large number of patches. So their use is very valid of course and I guess any tool changes are very disruptive there given the large amount of stakeholders. The statistics on that project are in any case mindblowing. You can get a good picture of that via Githubs insights on Linus Torvalds fork of linux. I don't think he uses pull requests though. Is there an issue tracker for linux even?
>The nice innovation of the pull request by Github achieves a similar flow but with a pretty UI, easy to use tools for commenting, line by line review, search, issue tracker integration, and a bunch of other things that IMHO stopped being optional on most projects. I kind of like the traceability of PR #4 closes issue #13 and successfully cleared CI & received a positive review so it is safe to merge.
There is nothing preventing these features from being done with email, either.
>You can get a good picture of that via Githubs insights on Linus Torvalds fork of linux. I don't think he uses pull requests though. Is there an issue tracker for linux even?
I wrote an article which can offer some insight into the Linux development process:
https://drewdevault.com/2020/09/02/Linux-development-is-prof...
But don't most people use the CLI to run or edit their source code in some fashion?
See the following write up this 2018 write up on email vs GitHub flow https://drewdevault.com/2018/07/02/Email-driven-git.html
It also allows for a group of people to be co-maintainers (e.g. 2 people need to approve a patch before it get merged), and when tied into a CI tool like zuul-ci can help projects be sure the CI tests are testing the actual merged state of the project.
The downsides are people need to learn how to rebase, use git commit --ammend, and for the easiest submission install something like git-review or repo to submit patches. (it is possible to use gerrit without them, but remembering the syntax of git push refs/for/<branch> can be difficult.
Personally (this is completely anecdotal, and not backed by any serious data), I have found it drives people to do multiple small commits, as they rebase a lot easier.
using something like git review means that the entire chain is rebased by default when you summit a new patch on top, and I have the `git commit --am -a --no-edit && git fetch && git rebase` in muscle memory at this point.
(the lack of ability to have PRs based off other open PRs is one of the biggest issues I have with the current github / pull request model, so I probably over compensate for that type of situation)
At least in bitbucket, you can just set a branch under review as the target of a pull request and the UI "just works" for that case.
Is a git-mail-flow compatible with continuous integration? Yes, it seems to be
https://sourcehut.org/blog/2020-07-14-setting-up-ci-for-mail...
Is it possible to construct ergonomic workflows around a git-mail-flow? I suspect you could do it with notmuch and alot, although I wonder which tools do sourcehut users prefer.
Greg-KH has also written about his mutt workflow:
http://www.kroah.com/log/blog/2019/08/14/patch-workflow-with...
Though his volume and needs are probably different from most users.
Remember when a Debian maintainer quit due to the obsoleteness of the toolchain that the other maintainers flat out refused improve because "it worked" ( my google-fu is failing me, if someone finds it please post it)? I imagine things to be the same with the kernel ( not saying the toolchain is obsolete, just that if it were, they won't just change and jump to the latest X).
https://www.collabora.com/news-and-blog/blog/2020/08/27/usin...
There's your problem right there. If you expect unix models to follow the particular broken-by-design failures of Windows on the server then that's the problem.
Unix models have their own broken-by-design crap, and it is different to the one you know :-)
I can work with Windows, but I hate every second of it. Meanwhile, Linux/BSD is intuitive and easy to get going.
Almost like what tools you know impact what you find easy.
People who are more used to a hub and spoke model - aka, a maintainer receiving tonnes of patches from many different people - would prefer the git email flow (it requires less work from them - patches that don't merge is pushed back to the contributor).
continuous integration isn't trunk-based development (where everyone merges into the same master branch)!
"The idea that developers should work in small batches off master or trunk rather than on long-lived feature branches *is still one of the most controversial ideas in the Agile canon*, despite the fact *it is the norm in high-performing organizations such as Google.* Indeed, many practitioners express surprise that this practice is in fact implied by continuous integration, but it is: The clue is in the word “integration.”
[State of DevOps report 2016]
I’ve heard that Linus Torvalds disliked GitHub pull requests in part because they tried to reinvent the wheel instead of using Git’s native system. I wasn’t clear on what that native system was until reading this article.
Squash-n-merge has nice property of removing unnecessary local information that probably doesn't matter at a meta level (commits are nice when reviewing PR, doesn't matter much later)
Yes squash-n-merge is often needed in github's PR workflow because no one need those un-bisect-able fixup commits in the final merged master/main branch, and also they make the diff between different states of the PR more readable, but it comes with its own problems.
Main problem is commit message. As the contributor (the one sending out the PR for maintainer to review), you have no control on what the final commit message in the merged single commit is. The maintainer doing the merge decides that for you, and by default github generates that message by combining all the commit message titles (the first line of the commit messages) of all the commits in that branch, and that's almost never the good choice for the final commit message.
Another problem with that is the email in the final commit. When the maintainer use squash-n-merge, github uses your default email on file on your github account, regardless whichever email(s) you configured your git to use and associated with those individual commits inside the PR.
As a result, squash-n-merge is more suitable for contributors less familiar with open source contribution, for example people not yet realized the value of a good, concise commit message, and people don't have different email addresses for different projects. For advanced contributors, there's no wonder they would prefer force-push with rebase-merge when they are making contributions on github, because rebase-merge makes sure the exact state of their final commit is preserved, including commit message, email address associated with it, and gpg signature if they use that. But github's rebase-merge strategy has its own issues, as described by the author and more.
For example this still has a commit message issue, just on the maintainer's side: As the maintainer if you are going to use rebase to merge this PR, that means you need to accept whatever commit message the contributor wrote as-is. Are you happy with that? If not, you can't even leave inline comments on that, and it's usually pretty hard to communicate and give feedback on how you want the commit message to be.
If you require PRs to create merge commits you get the nice world where git bisect --first-parent bisects at the PR level, you don't have to worry about the individual commits inside the PR/below the PR level when bisecting, but you still have that commit history "as-is" for deep archeological dives when you need it.
(And you can use --first-parent to cleanup git log and git praise too.)
So squash-and-merge is a bad one-size-fits-all. Rebase is a much much better approach: you keep the history as submitted and you lose the useless merge commit. There's no "unnecessary local information" if the submitter did the work of cleaning up their history before submitting. That means doing interactive rebases locally to squash/fixup/edit(and-possibly-split)/reword/drop/reorder their commits -- this is something every developer should know how to do.
I agree that code review you want smaller units but my experience has been that 1-2 years later, you no longer care about the individual units and instead you want the entire patch/PR all together.
Which is why larger changes are often split into smaller patches that may be applied and tested incrementally. If you just merge the whole pull request as one huge patch / in merge commit, you just lost most of that.
• Setting `merge.ff=no` in git config to force merge commits by default.
• Creating a series of logical commits on `my-feature-branch`.
• Merging `my-feature-branch` into `main` with a bona fide merge commit.
• Using `git branch -d my-feature-branch` (NOT capital `-D`) to delete the feature branch safely and without worry, since `-d` only deletes the branch if the commits are present on HEAD.
• Using `git log --oneline --graph` to see a clean representation of the actual history.
I'd rather `merge.ff = only` so git never creates a merge commit from under me. It's a big issue because of `git pull`, that thing should not exist.
Most git tools are wholly unable to deal with really merge-heavy graphs, too.
For sensitive projects, ideally no code can be merged in unless it is reviewed by somebody else. Even if no malicious code is added, the extra layer of review adds at least some degree of accountability.
As for the issues the author mentions, Azure DevOps mostly solves these by having squash commits which can be set to autocomplete once fully approved via reviewers and CI. You can do merging manually in ADO, but most of the time I (the author of the PR) just rebase or merge manually before completing the PR or setting auto complete.
There is no VCS that I know of which handles many people modifying the same files simultaneously in a nice way. If you allow for more clever auto merging, you increase the likelihood your merge algorithm produces nonsense. The author should probably be doing this merging since they are the expert on their changes. I think the only real alternative would be if a VCS allowed for a custom merge algorithm (which could do different strategies for different files). A package.json file can't really be merged without some understanding of what a package.json file is or at the very least what a JSON file is.
This is often avoided by doing a merge with main branch instead of a rebase.
That information could just as well not be there if you created the feature branch from the main branch after the latter was updated. The merge commit doesn't really provide any useful information, which is why many consider it noise that shouldn't be in the commit history.
Another problem is html mail. Lists and patches are easier to read as plain text. But again, it's hard in modern clients to figure out if you are composing a plain-text or html mail. As a result, you end up with mangled patches and badly formatted text in the mailing list. Another really annoying problem is top-posting when replying to a mail. Ideally, the quotes from original message and the reply should be interleaved, so that the context of the discussion is very clear. But web clients often just quote the entire original message and hide it away at the bottom of the reply. It isn't even easy to expand and split the quotes.
Finally, there is the problem of applying patches to repository from email. I don't think this was even a design consideration for modern clients.
> What am I missing from some amazing holy grail mail client
I assume you are unfamiliar with the workflow. The reality is that the UI is never ideal, even with traditional text mail clients. List support is better than with modern clients, but patches need hacks or a bunch of other tools. But the tool selection makes it way more tolerable than using web-clients or modern desktop clients. There is a lot of room for improvements and there are on-going efforts to improve the situation (like ddevault's aerc). However, you end up with the realization that mailing lists and git email workflow can be as easy and enjoyable as fork-pr workflow, once you overcome the difficulty of initial setup. Perhaps some day, we will have a text client that is trivial to setup and covers all the steps in using mailing lists and patches.
For now though, I believe that mutt is the most commonly used client for the workflow. For some other reason, I use mu4e as my client. Drew Devault's aerc looks promising in the long term. For more detailed explanation, have a look at this post by Greg Kroah-Hartman: http://www.kroah.com/log/blog/2019/08/14/patch-workflow-with... (I just discovered this today from ddevault's reply in this discussion).
I believe that patchset application is treated the same way as rebasing. It should be possible to apply patches to the master without conflicts as long as the two branches haven't diverged too much. In case the branches did diverge a lot, the contributor is expected to sort it out by the rebase mentioned above. Patch workflow forces you to think about diff introduced by each commit, instead of worrying only about conflicts between two branches when merging.
Ultimately, it requires care and discipline from contributor and maintainer that is not strictly necessary with fork-PR workflow. However, commit quality would improve a lot if the same discipline was followed everywhere.
Martin Fowler has a good post on the subject: https://martinfowler.com/articles/branching-patterns.html#Co...
tl;dr: if you make big feature branches and take a lot of time to integrate them it's a painful process.
Something like:
git push master:email/v1
Email/v1 branch would not be created, it would just be a virtual target branch name for this functionality.You can easily make a git hook script to do it with regular ssh/http based git hosting.