[Insight-developers] How to apply e-mail patch in git

Brad King brad.king at kitware.com
Mon Aug 23 09:47:05 EDT 2010


On Sat, Aug 21, 2010 at 2:14 PM, Bradley Lowekamp wrote:
> The documentation for this process:
> http://www.kernel.org/pub/software/scm/git/docs/git-am.html
> http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html

These two tools are about generating and applying patches formatted
for use through email.  There is nothing that restricts them from
being transmitted by other means.  One can just pass the email files
as arguments to "git am".

On Sat, Aug 21, 2010 at 2:41 PM, Bill Lorensen wrote:
> I cut and pasted the patch from a file. I wasn't sure what the proper
> way was. I think attaching is better.

Use of attachments is more intuitive for many people, but there are
advantages to sending them as real emails.  With the patch content
inline in messages it is easy to perform code review in response to
a patch directly on a mailing list.  One can quote fragments of the
patch just like any other text in an email and then reply to it
inline.

Most email clients support saving a whole email out as a ".eml" file.
These files will work as input to "git am".

On 08/21/2010 04:32 PM, Luis Ibanez wrote:
> I took a first cut at describing the process
> for contributing patches, here:
>
> http://www.itk.org/Wiki/ITK/Git#Contributing_Patches

Similar instructions already existed in the VTK wiki.
I've consolidated both sets of instructions:

 http://public.kitware.com/Wiki/Git/Publish#Patches

I linked them from the ITK Git wiki here:

 http://www.itk.org/Wiki/ITK/Git#Patches

-Brad K


More information about the Insight-developers mailing list