6 ms·
> It'd be a useful thing to import without having to bring in the whole charade of using email and mailing lists (which most mail clients tend to be very unfavo
by u801e 3y ago
> It'd be a useful thing to import without having to bring in the whole charade of using email and mailing lists (which most mail clients tend to be very unfavorable of in general nowadays)
This is a misconception. git itself has commands (git-format-patch and git-send-email) that automate the creation of patches and sending changeset email threads to the mailing list. The only thing one needs to do is set the appropriate configuration settings in their git config (which is a one time operation like setting your name and email address).
The actual interaction on the mailing list (responding to those who review patches and changesets can be done in any email client of one's choosing (though it's helpful to use an email client that supports threading using the Message-Id, In-Reply-To and Reference headers rather than one that only handles conversation view style replies).
- da39a3ee 3y agoNo, it is not a misconception. How do I apply a patch from gmail to a specific git repo on my computer? (I would genuinely like to know the answer, but it must not involve mutt, gnus, or dovecot!)
- JohnKemeny 3y agoCopy the content of the email to your clipboard, type `git am` in your terminal, paste and C-d to complete.
- da39a3ee 3y agoOK thanks, that sounds fairly convenient for small patches. And I expect you'd say download the email for larger patches (as a sibling commenter suggests).
- sammorrowdrums 3y agoIn the worst case you can copy paste a patch into a new local file in the repo and then apply it with git from there. I’ve had somebody slack me patches before and it is not a big lift.
- u801e 3y agoSave the email to your local machine (in gmail, click the 3 dots and choose download message). Then run git am < saved_email_file.eml
- da39a3ee 3y agoRight, thanks! (And using clipboard and stdin sounds even more convenient for small patches as a sibling comment suggests.)
- u801e 3y agoCopy-paste may not work depending on how the email client renders the email. For example, if the email client doesn't preserve prefixed whitespace, then the resulting patch may be corrupted or not apply. Saving the actual email to a file on disk would avoid that issue.
- ori_b 3y agoMany local mail clients also just let you pipe the message into a command; for example, in mutt, you could just type: |git am once you have the message open.
- jen20 3y agoYou may have a skewed idea of “most” here. Most people are using gmail, but when it comes to local clients, Outlook, Apple Mail and Thunderbird are by far the most common and as far as I know none of them support this without extra steps.