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

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

From
DCDavid Chanters <david.chanters@googlemail.com>
Date
Jan 8, 2011, 13:43 UTC
Message-ID
<AANLkTinx9qM=fjH53UodY0G870Ne3wpFiFEgEGNXxOY7@mail.gmail.com>
In-Reply-To
<4D284F57.2000808@dbservice.com>
Hi Tomas,
On 8 January 2011 11:49, Tomas Carnecky <tom@dbservice.com> wrote:
> What exactly do you need to change in the patch? Remove the index line? The
> '--git' string? Remove or change the a/, b/ prefix?

Well, any one of those goals, really. I just want to generate a patch that CVS won't barf on -- what that means if not needing to use the "-p" option to patch because git outputs a/ b/ prefix lines. Your "--no-prefix" option does that much, which might be enough.

I did read, I think on this list, that the GNU Patch program interprets these "diff --git" lines? What exactly are they for, do you know? I mean, even if I just did:

git diff --no-prefix

Would the presense of the other meta-data, such as the "diff --git" line as well as the "Index" line cause any problems when applying this patch in CVS (I suppose now, my question doesn't have to apply to CVS at all, more likely it will apply to any file sets)? I am not sure how GNU Patch uses this meta information, and I assume "git diff" adds it for a good reason.

I hope this all makes sense?
David
Previous: Tomas CarneckyNext: Andreas Schwab
Message 3 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.