Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommended email client to read/apply git patches? [closed]

Tags:

git

linux

email

I spend a good time of the day reading and applying patches send through git-format-patch/git-send-email and I wonder how I could improve my workflow. Very certainly there are more convenient tools than GMail or Thunderbird for doing that.

My mail comes from an IMAP server, so I am rather flexible with respect to the solution. Text-based or GUI clients are fine, even webmails if they do the job right. Basically I'm looking for a good general-purpose email client that is capable of exporting git patches easily without ruining them. It has to be usable under Linux.

Extra points for:

  • GMail-like conversations threading
  • Patches highlighting (e.g. green for new lines, red for removed lines, ...)
  • Ability to see the patch applied to a given code base (external tools are ok as long as they can be invoked from the client itself).

I have been surprised to not find a similar question since this seems like a rather common use of git and email. Thanks for your suggestions!

like image 200
Gnurou Avatar asked Apr 24 '13 07:04

Gnurou


People also ask

How do I apply a patch to an email?

You can apply a patch as a commit from a mail message following these steps: Open the GMail web page in the message with patch data. Click at the ellipsis icon located at top-right of this message. Click at "Show Original".

Why use git patch?

GIT patch or GIT diff is used to share the changes made by you to others without pushing it to main branch of the repository. This way other people can check your changes from the GIT patch file you made and suggest the necessary corrections.

How do I terminate git am?

The command refuses to process new mailboxes until the current operation is finished, so if you decide to start over from scratch, run git am --abort before running the command with mailbox names.


1 Answers

There are three pieces to this story:

  • Highlighting patch format: For example Thunderbird has a Colored Diffs add-on. Other popular email clients probably have similar add-ons.
  • Exporting patches formated with git format-patch: Create a local folder in your Thunderbird or what have you. Copy any email messages to that folder using drag-and-drop or right click contextual menu or whatever suits you. This will download the emails from the IMAP server to your local machine.
  • Applying all the patches from the local email folder: Locate the local folder withing your homedir (my Thunderbird stores it in ~/.thunderbird/*.default/Mail/Local Folders/<Folder name>). Apply all the patches from all the locally exported emails in one go using git am. Then it's your normal Git workflow: you examine the result, merge stuff, cherry-pick stuff, throw away stuff, and do everything you already know.
like image 72
Tadeusz A. Kadłubowski Avatar answered Sep 29 '22 00:09

Tadeusz A. Kadłubowski