git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Creating a patch set with git-format-patch

From
Sean Estabrooks <seanlkml@sympatico.ca>
Date
Apr 10, 2008, 10:56 UTC
Message-ID
<BAYC1-PASMTP020D4804B5CBAC8A5BEBD5AEEC0@CEZ.ICE>
In-Reply-To
<d0383f90804100151s6ffde16al6035116c27c9cb3a@mail.gmail.com>

On Thu, 10 Apr 2008 11:51:59 +0300 "Ian Brown" <ianbrn@gmail.com> wrote:

Hi Ian,
Show 6 quoted lines
> I intend to  make a change in two files: net/ipv4/route.c and
> include/net/dst.h and send a patch set of two patches for review.
> Now I want to create this  patch set of two pathces correctly;
> First patch for net/ipv4/route.c and second for include/net/dst.h.
> 
> what should I do ?

The first step is to edit route.c and commit your change to Git with a complete description[1]. Then edit the dst.h file and commit that to Git as a separate change. Afterward you can use git format-patch to prepare these commits to be emailed:

$  git format-patch HEAD^^

This tells Git to create a text file in the current directory for each commit made since the reference you pass. You can then configure git send-email[2] to send these text files out, or send them manually with your regular email client. If you do send them manually, make sure to include the text file inline in your email, don't send it as an attachment. You will find a subject line inside the file you can cut-and-paste into place, and a few other headers that you'll need to delete.

HTH, Sean

[1] Remember that each commit log entry should be made as a one-line overview, followed by a blank line, followed by as much prose as it takes to fully explain the change.

[2] There is a small section about configuring git-send-email for use with gmail using msmtp here: http://git.or.cz/gitwiki/GitTips

Previous: Stephan Beyer
Message 4 of 4 in “Creating a patch set with git-format-patch”
  1. Ian BrownApr 10, 2008
  2. Björn SteinbrinkApr 10, 2008
  3. Stephan BeyerApr 10, 2008
  4. Sean EstabrooksApr 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.