Re: Patch-level-format conversion

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Patch-level-format conversion

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:51:29

(+cc: the git list so others can correct me.  I hope that's okay.)

Hi,

Sedat Dilek wrote:
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 [off-list ref]
 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 [off-list ref]
     Acked-by: Linus Torvalds [off-list ref]
     Signed-off-by: Junio C Hamano [off-list ref]

Hope that helps.
Jonathan

Re: Patch-level-format conversion

From: Sedat Dilek <hidden>
Date: 2016-06-15 22:51:29

On Wed, Jun 15, 2011 at 10:55 PM, Jonathan Nieder [off-list ref] wrote:
(+cc: the git list so others can correct me.  I hope that's okay.)

Hi,

Sedat Dilek wrote:
quoted
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 [off-list ref]
 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 [off-list ref]
    Acked-by: Linus Torvalds [off-list ref]
    Signed-off-by: Junio C Hamano [off-list ref]

Hope that helps.
Jonathan
Hi Jonathan,

I played a bit with git format-patch and git diff and got some helpful
hints from friends of #grml and #quassel.de.
Attached is the README.txt I produced some hours ago.

Regards,
- Sedat -
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help