@@ -344,50 +344,20 @@ MUA specific hints
344344
345345Some of patches I receive or pick up from the list share common
346346patterns of breakage. Please make sure your MUA is set up
347- properly not to corrupt whitespaces. Here are two common ones
348- I have seen:
347+ properly not to corrupt whitespaces.
349348
350- * Empty context lines that do not have _any_ whitespace.
349+ See the DISCUSSION section of git-format-patch(1) for hints on
350+ checking your patch by mailing it to yourself and applying with
351+ git-am(1).
351352
352- * Non empty context lines that have one extra whitespace at the
353- beginning.
354-
355- One test you could do yourself if your MUA is set up correctly is:
356-
357- * Send the patch to yourself, exactly the way you would, except
358- To: and Cc: lines, which would not contain the list and
359- maintainer address.
360-
361- * Save that patch to a file in UNIX mailbox format. Call it say
362- a.patch.
363-
364- * Try to apply to the tip of the "master" branch from the
365- git.git public repository:
366-
367- $ git fetch http://kernel.org/pub/scm/git/git.git master:test-apply
368- $ git checkout test-apply
369- $ git reset --hard
370- $ git am a.patch
371-
372- If it does not apply correctly, there can be various reasons.
373-
374- * Your patch itself does not apply cleanly. That is _bad_ but
375- does not have much to do with your MUA. Please rebase the
376- patch appropriately.
377-
378- * Your MUA corrupted your patch; "am" would complain that
379- the patch does not apply. Look at .git/rebase-apply/ subdirectory and
380- see what 'patch' file contains and check for the common
381- corruption patterns mentioned above.
382-
383- * While you are at it, check what are in 'info' and
384- 'final-commit' files as well. If what is in 'final-commit' is
385- not exactly what you would want to see in the commit log
386- message, it is very likely that your maintainer would end up
387- hand editing the log message when he applies your patch.
388- Things like "Hi, this is my first patch.\n", if you really
389- want to put in the patch e-mail, should come after the
390- three-dash line that signals the end of the commit message.
353+ While you are at it, check the resulting commit log message from
354+ a trial run of applying the patch. If what is in the resulting
355+ commit is not exactly what you would want to see, it is very
356+ likely that your maintainer would end up hand editing the log
357+ message when he applies your patch. Things like "Hi, this is my
358+ first patch.\n", if you really want to put in the patch e-mail,
359+ should come after the three-dash line that signals the end of the
360+ commit message.
391361
392362
393363Pine
@@ -443,89 +413,10 @@ that or Gentoo did it.) So you need to set the
443413it.
444414
445415
446- Thunderbird
447- -----------
448-
449- (A Large Angry SCM)
450-
451- By default, Thunderbird will both wrap emails as well as flag them as
452- being 'format=flowed', both of which will make the resulting email unusable
453- by git.
454-
455- Here are some hints on how to successfully submit patches inline using
456- Thunderbird.
457-
458- There are two different approaches. One approach is to configure
459- Thunderbird to not mangle patches. The second approach is to use
460- an external editor to keep Thunderbird from mangling the patches.
461-
462- Approach #1 (configuration):
463-
464- This recipe is current as of Thunderbird 2.0.0.19. Three steps:
465- 1. Configure your mail server composition as plain text
466- Edit...Account Settings...Composition & Addressing,
467- uncheck 'Compose Messages in HTML'.
468- 2. Configure your general composition window to not wrap
469- Edit..Preferences..Composition, wrap plain text messages at 0
470- 3. Disable the use of format=flowed
471- Edit..Preferences..Advanced..Config Editor. Search for:
472- mailnews.send_plaintext_flowed
473- toggle it to make sure it is set to 'false'.
474-
475- After that is done, you should be able to compose email as you
476- otherwise would (cut + paste, git-format-patch | git-imap-send, etc),
477- and the patches should not be mangled.
478-
479- Approach #2 (external editor):
480-
481- This recipe appears to work with the current [*1*] Thunderbird from Suse.
482-
483- The following Thunderbird extensions are needed:
484- AboutConfig 0.5
485- http://aboutconfig.mozdev.org/
486- External Editor 0.7.2
487- http://globs.org/articles.php?lng=en&pg=8
488-
489- 1) Prepare the patch as a text file using your method of choice.
490-
491- 2) Before opening a compose window, use Edit->Account Settings to
492- uncheck the "Compose messages in HTML format" setting in the
493- "Composition & Addressing" panel of the account to be used to send the
494- patch. [*2*]
495-
496- 3) In the main Thunderbird window, _before_ you open the compose window
497- for the patch, use Tools->about:config to set the following to the
498- indicated values:
499- mailnews.send_plaintext_flowed => false
500- mailnews.wraplength => 0
501-
502- 4) Open a compose window and click the external editor icon.
503-
504- 5) In the external editor window, read in the patch file and exit the
505- editor normally.
506-
507- 6) Back in the compose window: Add whatever other text you wish to the
508- message, complete the addressing and subject fields, and press send.
509-
510- 7) Optionally, undo the about:config/account settings changes made in
511- steps 2 & 3.
416+ Thunderbird, KMail, GMail
417+ -------------------------
512418
513-
514- [Footnotes]
515- *1* Version 1.0 (20041207) from the MozillaThunderbird-1.0-5 rpm of Suse
516- 9.3 professional updates.
517-
518- *2* It may be possible to do this with about:config and the following
519- settings but I haven't tried, yet.
520- mail.html_compose => false
521- mail.identity.default.compose_html => false
522- mail.identity.id?.compose_html => false
523-
524- (Lukas Sandström)
525-
526- There is a script in contrib/thunderbird-patch-inline which can help
527- you include patches with Thunderbird in an easy way. To use it, do the
528- steps above and then use the script as the external editor.
419+ See the MUA-SPECIFIC HINTS section of git-format-patch(1).
529420
530421Gnus
531422----
@@ -540,71 +431,3 @@ characters (most notably in people's names), and also
540431whitespaces (fatal in patches). Running 'C-u g' to display the
541432message in raw form before using '|' to run the pipe can work
542433this problem around.
543-
544-
545- KMail
546- -----
547-
548- This should help you to submit patches inline using KMail.
549-
550- 1) Prepare the patch as a text file.
551-
552- 2) Click on New Mail.
553-
554- 3) Go under "Options" in the Composer window and be sure that
555- "Word wrap" is not set.
556-
557- 4) Use Message -> Insert file... and insert the patch.
558-
559- 5) Back in the compose window: add whatever other text you wish to the
560- message, complete the addressing and subject fields, and press send.
561-
562-
563- Gmail
564- -----
565-
566- GMail does not appear to have any way to turn off line wrapping in the web
567- interface, so this will mangle any emails that you send. You can however
568- use "git send-email" and send your patches through the GMail SMTP server, or
569- use any IMAP email client to connect to the google IMAP server and forward
570- the emails through that.
571-
572- To use "git send-email" and send your patches through the GMail SMTP server,
573- edit ~/.gitconfig to specify your account settings:
574-
575- [sendemail]
576- smtpencryption = tls
577- smtpserver = smtp.gmail.com
578- 579- smtppass = p4ssw0rd
580- smtpserverport = 587
581-
582- Once your commits are ready to be sent to the mailing list, run the
583- following commands:
584-
585- $ git format-patch --cover-letter -M origin/master -o outgoing/
586- $ edit outgoing/0000-*
587- $ git send-email outgoing/*
588-
589- To submit using the IMAP interface, first, edit your ~/.gitconfig to specify your
590- account settings:
591-
592- [imap]
593- folder = "[Gmail]/Drafts"
594- host = imaps://imap.gmail.com
595- 596- pass = p4ssw0rd
597- port = 993
598- sslverify = false
599-
600- You might need to instead use: folder = "[Google Mail]/Drafts" if you get an error
601- that the "Folder doesn't exist".
602-
603- Once your commits are ready to be sent to the mailing list, run the
604- following commands:
605-
606- $ git format-patch --cover-letter -M --stdout origin/master | git imap-send
607-
608- Just make sure to disable line wrapping in the email client (GMail web
609- interface will line wrap no matter what, so you need to use a real
610- IMAP client).
0 commit comments