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

Re: format-patch: numbered patches from a patch list?

From
Jeff King <peff@peff.net>
Date
Jul 22, 2009, 02:44 UTC
Message-ID
<20090722024445.GA31254@coredump.intra.peff.net>
In-Reply-To
<auto-000020035874@sci.utah.edu>
On Tue, Jul 21, 2009 at 08:25:52PM -0600, tom fogal wrote:
Show 12 quoted lines
> I have a need to generate a numbered sequence of patches from a sparse
> sprinkling of patches on a branch.  Is there a way to accomplish this?
> 
> Basically I want to say, `for the patches at the heads of these sha1s,
> give me a numbered sequence.'  Currently I take the list of shas that I
> want, throw them in a file, and loop over each entry:
> 
>   for sha in $(cat patches) ; do git format-patch -o a/ ${sha}^..${sha} ; done
> 
> This is undesirable because each patch is the first patch in a series,
> e.g. "0001-...".  A desirable interface would be specifying multiple
> disconnected ranges via some separator, say ",".
Try
  git format-patch --no-walk $(cat patches)
-Peff
Previous: Junio C HamanoNext: tom fogal
Message 3 of 4 in “format-patch: numbered patches from a patch list?”
  1. tom fogalJul 22, 2009
  2. Junio C HamanoJul 22, 2009
  3. Jeff KingJul 22, 2009
  4. tom fogalJul 22, 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.