Hello all,

With the news on CG revision I remembered I had never got round to
contributing a patch about solving the issues I had with patches and
email MIME types.  So here it is.

It can probably be improved but this gets across the basic info, and it
includes a link to pages with further information.

Best wishes,

    -- Joe
From 0b16d7c2d074eeb8f33ed77494bdd26ef9b182db Mon Sep 17 00:00:00 2001
From: Joseph Wakeling <joseph.wakel...@webdrake.net>
Date: Tue, 12 Jan 2010 15:42:04 +0100
Subject: [PATCH] Information on sending/receiving git 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.

It also incidentally removes some trailing whitespace. :-P
---
 Documentation/contributor/git-starting.itexi |   72 ++++++++++++++++++--------
 1 files changed, 50 insertions(+), 22 deletions(-)

diff --git a/Documentation/contributor/git-starting.itexi 
b/Documentation/contributor/git-starting.itexi
index fb45b59..d6e23e5 100644
--- a/Documentation/contributor/git-starting.itexi
+++ b/Documentation/contributor/git-starting.itexi
@@ -9,10 +9,10 @@ usage in this chapter, it may be a good idea to look at the 
other
 Git documentation listed in @ref{Other git documentation}.
 
 @menu
-* Getting the source code::     
-* Updating the source code::    
-* Sharing your changes::        
-* Advanced git stuff::          
+* Getting the source code::
+* Updating the source code::
+* Sharing your changes::
+* Advanced git stuff::
 * Git on Windows::
 * Other git documentation::
 * Roadmap of directories::
@@ -23,12 +23,12 @@ Git documentation listed in @ref{Other git documentation}.
 @section Getting the source code
 
 @menu
-* Git introduction::            
-* Git user configuration::      
-* Main source code::            
-* Documentation translations source code::  
-* Other branches::              
-* Other locations for git::     
+* Git introduction::
+* Git user configuration::
+* Main source code::
+* Documentation translations source code::
+* Other branches::
+* Other locations for git::
 @end menu
 
 @node Git introduction
@@ -146,9 +146,9 @@ internet through a router that filters out Git and/or SSH 
connections.
 @section Updating the source code
 
 @menu
-* Importance of updating::      
-* Update command::              
-* Resolving conflicts::         
+* Importance of updating::
+* Update command::
+* Resolving conflicts::
 @end menu
 
 
@@ -225,8 +225,8 @@ any changes you have made!
 @section Sharing your changes
 
 @menu
-* Producing a patch::           
-* Committing directly::         
+* Producing a patch::
+* Committing directly::
 @end menu
 
 
@@ -358,13 +358,14 @@ Some Git commands are introduced first, then a workflow 
with several
 Git branches of LilyPond source code is presented.
 
 @menu
-* Introduction to Git concepts::  
-* Git commands for managing several branches::  
-* Working on LilyPond sources with several branches::  
+* Introduction to Git concepts::
+* Git commands for managing several branches::
+* Working on LilyPond sources with several branches::
 * Git log::
 * Using local git branches::
-* Applying git patches::        
-* Reverting all local changes::  
+* Applying git patches::
+* Sending and receiving patches via email::
+* Reverting all local changes::
 @end menu
 
 
@@ -373,7 +374,7 @@ Git branches of LilyPond source code is presented.
 
 A bit of Git vocabulary will be explained below.  The following is
 just introduction material; for better understanding of Git concepts,
-you are invited to read further documentation, especially Git
+you are invited to read further documentation, especially the Git
 Community Book at @uref{http://book.git-scm.com/}.
 
 The @code{git pull origin} command above is just a shortcut for this
@@ -672,6 +673,33 @@ git commit -a --author="First Last <user@@example.net>"
 @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 Reverting all local changes
 @subsection Reverting all local changes
 
@@ -738,7 +766,7 @@ and are terminated by keying a newline.
 
 Decide where you wish to place your local Git repository,
 creating the folders in Windows as necessary.  Here we
-call the folder to contain the repository @code{[path]/Git}, but 
+call the folder to contain the repository @code{[path]/Git}, but
 if you intend using Git for other projects a directory name like
 @code{lilypond-git} might be better.  You will need to have space
 for around 100Mbytes.
-- 
1.6.3.3

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to