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

Re: Generating patches/Cherry Picking for a large number of commits

From
Jeff King <peff@peff.net>
Date
Aug 28, 2009, 21:54 UTC
Message-ID
<20090828215420.GA18336@coredump.intra.peff.net>
In-Reply-To
<ae09c2a40908281250r42275a3o96825b89e725bace@mail.gmail.com>
On Fri, Aug 28, 2009 at 02:50:53PM -0500, Alydis wrote:
Show 6 quoted lines
> While I have your attention, however, I noticed that git am <path>
> will apply the list patches generated by format-patch.  The
> documentation said something about mbox/maildir directories, which I
> actually am not that familiar with.  Is it safe to say that git am
> <path> will read the path and apply patches in numerical order?  Does
> it allow skipping?

It will apply the patches in the order given on the command line. When your shell expands the "patches/*" glob, it will do so in lexically sorted order. Meaning "0001" comes before "0002", etc, which is the reason that format-patch zero-pads the filenames.

You can edit or delete the patches in your patch directory before applying, and they should apply the same (unless you create a patch that cannot actually be applied).

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 7 in “Generating patches/Cherry Picking for a large number of commits”
  1. AlydisAug 28, 2009
  2. Jeff KingAug 28, 2009
  3. AlydisAug 28, 2009
  4. Jakub NarebskiAug 28, 2009
  5. Junio C HamanoAug 28, 2009
  6. Jeff KingAug 28, 2009
  7. Junio C HamanoAug 28, 2009

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.