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

Re: Creating CVS-style patch headers with git-diff

From
Tomas Carnecky <tom@dbservice.com>
Date
Jan 8, 2011, 15:51 UTC
Message-ID
<4D288804.2050204@dbservice.com>
In-Reply-To
<AANLkTi=_YdTsvFboQAj447SUtcxrVhM18QkvSVdpvdMJ@mail.gmail.com>
  On 1/8/11 4:35 PM, David Chanters wrote:
> Sorry about that, that's poor wording on my part.  I don't mean "CVS
> won't barf" -- I meant that GNU Patch can still apply the patch
> without the meta-data referencing git still.  I think though this
> "--no-prefix" option might just do it.

Update your gnu patch. Never versions know how to handle the git specific metadata (gnu patch simply ignores it).

And the a/, b/ prefix is *not* git specific. Pretty much all versions of a patch program know how to deal with that, you just need to use -p1 on the commandline.

tom
Previous: David ChantersNext: Andreas Schwab
Message 6 of 9 in “Creating CVS-style patch headers with git-diff”
  1. David ChantersJan 8, 2011
  2. Tomas CarneckyJan 8, 2011
  3. David ChantersJan 8, 2011
  4. Andreas SchwabJan 8, 2011
  5. David ChantersJan 8, 2011
  6. Tomas CarneckyJan 8, 2011
  7. Andreas SchwabJan 8, 2011
  8. Tomas CarneckyJan 8, 2011
  9. Robin RosenbergJan 8, 2011

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.