From 7e244a2eda68d0578031794e5feecf4f21d9b823 Mon Sep 17 00:00:00 2001 From: Joseph Wakeling Date: Thu, 14 Jan 2010 15:30:21 -0800 Subject: [PATCH] Doc: CG: Sending and receiving patches via email. This contains the solution for MIMEtype problems experienced with some email clients, and a link to the Wine wiki page on git which contains much useful info. --- Documentation/contributor/working.itexi | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/contributor/working.itexi b/Documentation/contributor/working.itexi index 02d3052e17..4046ff9b92 100644 --- a/Documentation/contributor/working.itexi +++ b/Documentation/contributor/working.itexi @@ -815,6 +815,7 @@ several Git branches of LilyPond source code is presented. * Working with remote branches:: * Git log:: * Applying remote patches:: +* Sending and receiving patches via email:: * Commit access:: @end menu @@ -1052,6 +1053,36 @@ git commit -a --author="@var{John Smith} <@var{john@@example.com}>" @end example +@node Sending and receiving patches via email +@subsection Sending and receiving patches via email + + +The default @code{x-diff} MIME type associated with patch files +(i.e., files whose name ends in @code{.patch}) means that the +encoding of line endings may be changed from UNIX to DOS format +when they are sent as attachments. Attempting to apply such an +inadvertently altered patch will cause git to fail with a message +about @q{whitespace errors}. + +The solution to such problems is surprisingly simple---just change +the default file extension of patches generated by git to end in +@code{.txt}, for example: + +@example +git config format.suffix '.patch.txt' +@end example + +This should cause email programs to apply the correct base64 +encoding to attached patches. + +If you receive a patch with DOS instead of UNIX line-endings, it +can be converted back using the @code{dos2unix} utility. + +Lots of useful information on email complications with patches is +provided on the Wine wiki at +@uref{http://wiki.winehq.org/GitWine}. + + @node Commit access @subsection Commit access -- 2.39.5