threads / discuss / 11956

Using thunderbird to post/apply patches?

Subject: Using thunderbird to post/apply patches?

## tl;dr

9 messages between Feb 7, 2008 and Feb 8, 2008.

replies: 8people: 5as markdown or json

Martin Langhoff· Feb 7, 2008, 23:21 UTC · lore

Is there anyone using thunderbird/mozilla to post patches with additional email commentary like Junio and Linus do? Are there good tricks for this? Or otherwise a similar MUA that does things right?

The 2 workflows I am after are...
 - Load up a patch created with git-format-patch into my email editor
to add some commentary before sending. Should not munge the patch
itself!
 - Feed an email I am reading to git-apply-mbox so that if it's
reasonably formatted as a patch it will do the right thing and apply
it.
cheers,
m
Johannes Schindelin· Feb 7, 2008, 23:34 UTC · re: Martin Langhoff · lore

Re: Using thunderbird to post/apply patches?

Hi,
On Fri, 8 Feb 2008, Martin Langhoff wrote:
Show 9 quoted lines
> Is there anyone using thunderbird/mozilla to post patches with 
> additional email commentary like Junio and Linus do? Are there good 
> tricks for this? Or otherwise a similar MUA that does things right?
> 
> The 2 workflows I am after are...
> 
>  - Load up a patch created with git-format-patch into my email editor
> to add some commentary before sending. Should not munge the patch
> itself!

The "Thunderbird" section in Documentation/SubmittingPatches should help here.

>  - Feed an email I am reading to git-apply-mbox so that if it's
> reasonably formatted as a patch it will do the right thing and apply
> it.

Recently, git-am learnt to apply mails in maildir format. Thunderbird uses maildir format internally, if I am not mistaken.

Hth, Dscho

Martin Langhoff· Feb 7, 2008, 23:42 UTC · re: Johannes Schindelin · lore

Re: Using thunderbird to post/apply patches?

On Feb 8, 2008 12:34 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> The "Thunderbird" section in Documentation/SubmittingPatches should help
> here.

If that's state-of-the-art then thunderbird hasn't gotten any better since I last tried. Shame.

Show 6 quoted lines
> >  - Feed an email I am reading to git-apply-mbox so that if it's
> > reasonably formatted as a patch it will do the right thing and apply
> > it.
>
> Recently, git-am learnt to apply mails in maildir format.  Thunderbird
> uses maildir format internally, if I am not mistaken.

It uses mbox - but the delimiter is somewhat broken, so sometimes git-am fails to split the emails correctly.

A pretty sad story overall. Grumble...
m
Johannes Schindelin· Feb 8, 2008, 00:12 UTC · re: Martin Langhoff · lore

Re: Using thunderbird to post/apply patches?

Hi,
On Fri, 8 Feb 2008, Martin Langhoff wrote:
Show 16 quoted lines
> On Feb 8, 2008 12:34 PM, Johannes Schindelin 
> <Johannes.Schindelin@gmx.de> wrote:
>
> > Martin wrote:
> >
> > >  - Feed an email I am reading to git-apply-mbox so that if it's 
> > > reasonably formatted as a patch it will do the right thing and apply 
> > > it.
> >
> > Recently, git-am learnt to apply mails in maildir format.  
> > Thunderbird uses maildir format internally, if I am not mistaken.
> 
> It uses mbox - but the delimiter is somewhat broken, so sometimes git-am 
> fails to split the emails correctly.
> 
> A pretty sad story overall. Grumble...
Do you have an example of a non-working mbox for git-am?

Thanks, Dscho

Martin Langhoff· Feb 8, 2008, 04:27 UTC · re: Johannes Schindelin · lore

Re: Using thunderbird to post/apply patches?

On Feb 8, 2008 1:12 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Do you have an example of a non-working mbox for git-am?

good news - tested the mbox files I have (which used to get git-am to barf back in the v0.99 days), and they work well. So things have gotten much better on that front... probably git mailsplit got smarter. I doubt thunderbird has changed one bit :-)

cheers!
m
Brandon Casey· Feb 7, 2008, 23:44 UTC · re: Martin Langhoff · lore

Re: Using thunderbird to post/apply patches?

Martin Langhoff wrote:
Show 9 quoted lines
> Is there anyone using thunderbird/mozilla to post patches with
> additional email commentary like Junio and Linus do? Are there good
> tricks for this? Or otherwise a similar MUA that does things right?
> 
> The 2 workflows I am after are...
> 
>  - Load up a patch created with git-format-patch into my email editor
> to add some commentary before sending. Should not munge the patch
> itself!

I use git-send-email to first send the patch to myself. When it shows up in thunderbird, I Right-click and select "Edit As New..." Add my text, update the recipients, and voila.

If you're replying to a previous message, you can get the Message-ID to supply to git-send-email by selecting View->Headers->All. Copy&Paste everything between the angle brackets.

I have these options set in Edit->Preferences:
  Display->Formatting->Display emoticons as graphics: unchecked, it turns
    HEAD^2 into HEAD squared
  Composition->General->Wrap plain text messages at 0 characters
                                                    ^

I also have mailnews.send_plaintext_flowed => false as suggested in SubmittingPatches. There is a different suggestion in that document you may want to read.

>  - Feed an email I am reading to git-apply-mbox so that if it's
> reasonably formatted as a patch it will do the right thing and apply
> it.
I just Right-click and Save As...
cat <saved_as> | git am
-brandon
Jay Soffian· Feb 8, 2008, 04:10 UTC · re: Brandon Casey · lore

Re: Using thunderbird to post/apply patches?

On Feb 7, 2008 6:44 PM, Brandon Casey <casey@nrlssc.navy.mil> wrote:
> I also have mailnews.send_plaintext_flowed => false as suggested in
> SubmittingPatches.

Would teaching git-mailsplit to handle format=flowed be considered a useful contribution?

(W/o sounding like a total script weenie, I'm actually wondering if converting git-am, git-mailsplit, and git-mailinfo to Perl code wouldn't be a bad idea... groking email is a lot more pleasant in Perl than shell and/or C.)

j.
Junio C Hamano· Feb 8, 2008, 07:26 UTC · re: Jay Soffian · lore

Re: Using thunderbird to post/apply patches?

"Jay Soffian" <jaysoffian+git@gmail.com> writes:
Show 7 quoted lines
> On Feb 7, 2008 6:44 PM, Brandon Casey <casey@nrlssc.navy.mil> wrote:
>
>> I also have mailnews.send_plaintext_flowed => false as suggested in
>> SubmittingPatches.
>
> Would teaching git-mailsplit to handle format=flowed be considered a
> useful contribution?

In the way the e-mail processing toolchain is structured, I think git-mailinfo is the logical place to do that, not git-mailsplit. It already knows how to unwrap single level of MIME multi-part and also CTE.

Johannes Schindelin· Feb 8, 2008, 11:38 UTC · re: Jay Soffian · lore

Re: Using thunderbird to post/apply patches?

Hi,
On Thu, 7 Feb 2008, Jay Soffian wrote:
Show 12 quoted lines
> On Feb 7, 2008 6:44 PM, Brandon Casey <casey@nrlssc.navy.mil> wrote:
> 
> > I also have mailnews.send_plaintext_flowed => false as suggested in 
> > SubmittingPatches.
> 
> Would teaching git-mailsplit to handle format=flowed be considered a 
> useful contribution?
> 
> (W/o sounding like a total script weenie, I'm actually wondering if 
> converting git-am, git-mailsplit, and git-mailinfo to Perl code wouldn't 
> be a bad idea... groking email is a lot more pleasant in Perl than shell 
> and/or C.)

FWIW I think you have it backwards. It might look nicer in Perl, but we try very hard to consolidate the major pieces into C code. This is done for several reasons:

- reducing dependencies (not everybody needs all git programs, so it even 
helps if one script is converted at a time), and
- making the experience nicer on Windows (reducing the foot-print, since 
Perl is _not_ commonly installed, and drastically improving performance, 
since the number of processes is reduced).
So no, I would not like these scripts being converted (back?) to scripts.

Thank you, Dscho

← back to recent threads