On Wed, Jun 15, 2011 at 10:55 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: > (+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 <Johannes.Schindelin@xxxxxx> > Â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@xxxxxx> > Â Â Acked-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> > Â Â Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> > > 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 -
Q: How to generate freetz-conform patches out of a GIT repository? A. Follow these instructions. ### Checkout freetz development branch svn co http://svn.freetz.org/trunk/ freetz-trunk cd freetz-trunk/ ### Get latest revision revision=$(LC_ALL=C svn info | grep "Last Changed Rev" | awk {'print $4'}) echo $revision ### Turn freetz-trunk source-dir into a GIT repository git add --ignore-errors ./ ; git commit -m "`basename $PWD` SVN revision $revision" ### Edit some files and save changes $EDITOR file1 file2 ### Extract patchset git format-patch --no-prefix --no-numbered $FIRST..$LAST ### Some git format-patch options explained: --no-prefix: Do not show any source or destination prefix. -n, --numbered: Name output in [PATCH n/m] format, even with a single patch. -N, --no-numbered: Name output in [PATCH] format. - Sedat Dilek <sedat.dilek@xxxxxxxxx> (15-Jun-2011)