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

Re: Patch-level-format conversion

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jun 15, 2011, 20:55 UTC
Message-ID
<20110615205507.GB27172@elie>
In-Reply-To
<BANLkTimRArtFBqA4BFASjkS9BC1sbSfUJQ@mail.gmail.com>
(+cc: the git list so others can correct me.  I hope that's okay.)
Hi,
Sedat Dilek wrote:
Show 7 quoted lines
> I have here a patchset extracted from my own git-repo (via git format-patch).
>
> The project for which those patches are want "p0" format, means no
> ---- a/... +++ b/... but --- ... +++ ...
>
> IIRC git does "p1" format as default.
> Any help? Idea?

If I understand correctly, you are in luck. The "git format-patch --no-prefix" command thanks to Dscho seems to do exactly that:

 $ git log -Sno-prefix -- Documentation/diff-options.txt
 commit eab9a40b6dd5c1c571b1deb264133db47bb4794d
 Author: Johannes Schindelin <Johannes.Schindelin@gmx.de>
 Date:   Tue Dec 18 19:32:14 2007 +0000
     Teach diff machinery to display other prefixes than "a/" and "b/"
     With the new options "--src-prefix=<prefix>", "--dst-prefix=<prefix>"
     and "--no-prefix", you can now control the path prefixes of the diff
     machinery.  These used to by hardwired to "a/" for the source prefix
     and "b/" for the destination prefix.
     Initial patch by Pascal Obry.  Sane option names suggested by Linus.
     Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
     Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
     Signed-off-by: Junio C Hamano <gitster@pobox.com>

Hope that helps. Jonathan

Next: Sedat Dilek
Message 1 of 4 in “Re: Patch-level-format conversion”
  1. Jonathan NiederJun 15, 2011
  2. Sedat DilekJun 15, 2011
  3. Junio C HamanoJun 15, 2011
  4. Sedat DilekJun 15, 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.