{"thread":{"id":"11627","subject":"[FEATURE REQUEST] git-svn format-patch","startedAt":"2008-01-15T13:59:58Z","lastAt":"2008-03-12T04:38:19Z","messageCount":53,"participants":["Chris Ortman","Johannes Schindelin","Pascal Obry","Jean-Luc Herren","Jan Hudec","Daniel Barkalow","Junio C Hamano","Linus Torvalds","Miles Bader","Shawn O. Pearce","Jeff King","Nigel Magnay"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"65383","messageId":"c0f2d4110801150559x155ffabaj6bea52715522a070@mail.gmail.com","threadId":"11627","inReplyTo":null,"subject":"[FEATURE REQUEST] git-svn format-patch","fromName":"Chris Ortman","fromEmail":"chrisortman@gmail.com","sentAt":"2008-01-15T13:59:58Z","receivedAt":"2008-01-15T13:59:58Z","isPatch":false,"sender":{"key":"chrisortman@gmail.com","avatar":"https://gravatar.com/avatar/eee0ef2ab483c4675dccfb3fa08623592c1bceda0adb93c766f56dfed0a23af8?d=mp&s=160"},"body":"Something that would really benefit the folks who use git to manage a\nsubversion repository (such as myself) would be a special format-patch\ncommand for git-svn that creates a tortoise svn compatible diff file.\n\nThanks.\n"},{"id":"65385","messageId":"alpine.DEB.1.00.0801151444180.5289@eeepc-johanness","threadId":"11627","inReplyTo":"c0f2d4110801150559x155ffabaj6bea52715522a070@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-15T14:45:04Z","receivedAt":"2008-01-15T14:45:04Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 15 Jan 2008, Chris Ortman wrote:\n\n> Something that would really benefit the folks who use git to manage a \n> subversion repository (such as myself) would be a special format-patch \n> command for git-svn that creates a tortoise svn compatible diff file.\n\nHow does the output of \"git format-patch\" differ from that?  (I do not use \nTortoiseSVN, and I guess a lot of people on this list don't, either...)\n\nCiao,\nDscho\n"},{"id":"65387","messageId":"c0f2d4110801150758t68714570y83e1e74acbb67325@mail.gmail.com","threadId":"11627","inReplyTo":"alpine.DEB.1.00.0801151444180.5289@eeepc-johanness","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Chris Ortman","fromEmail":"chrisortman@gmail.com","sentAt":"2008-01-15T15:58:12Z","receivedAt":"2008-01-15T15:58:12Z","isPatch":false,"sender":{"key":"chrisortman@gmail.com","avatar":"https://gravatar.com/avatar/eee0ef2ab483c4675dccfb3fa08623592c1bceda0adb93c766f56dfed0a23af8?d=mp&s=160"},"body":"The format that TortoiseSVN expects is the same as the format of svn diff.\nThe most apparent differences are\n\ndiff --git a/Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\nb/Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\n\nbecomes\n\nIndex: Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\n\nand\n\nindex a0a0d38..9676e16 100644\n\nbecomes\n\n===================================================================\n\nand\n\n--- a/Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\n+++ b/Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\n\nbecomes\n\n--- Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\t(revision\n4715)\n+++ Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\t(working\ncopy)\n\nThe rest is pretty much the same.\n\nThanks\n"},{"id":"65388","messageId":"alpine.DEB.1.00.0801151612470.5289@eeepc-johanness","threadId":"11627","inReplyTo":"c0f2d4110801150758t68714570y83e1e74acbb67325@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-15T16:13:22Z","receivedAt":"2008-01-15T16:13:22Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 15 Jan 2008, Chris Ortman wrote:\n\n> The format that TortoiseSVN expects is the same as the format of svn diff.\n> The most apparent differences are\n>\n> [...]\n\nNothing a simple perl script cannot do.  Wanna give it a try?\n\nCiao,\nDscho\n"},{"id":"65389","messageId":"c0f2d4110801150823u7899e6dds1192b5f3bb3f7133@mail.gmail.com","threadId":"11627","inReplyTo":"alpine.DEB.1.00.0801151612470.5289@eeepc-johanness","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Chris Ortman","fromEmail":"chrisortman@gmail.com","sentAt":"2008-01-15T16:23:00Z","receivedAt":"2008-01-15T16:23:00Z","isPatch":false,"sender":{"key":"chrisortman@gmail.com","avatar":"https://gravatar.com/avatar/eee0ef2ab483c4675dccfb3fa08623592c1bceda0adb93c766f56dfed0a23af8?d=mp&s=160"},"body":"Sure, but I will probably need some guidance.\n\nAre you thinking to just create the standard patch but then regex\nreplace the necessary lines or something different?\n\nThanks\n"},{"id":"65391","messageId":"alpine.DEB.1.00.0801151650240.5289@eeepc-johanness","threadId":"11627","inReplyTo":"c0f2d4110801150823u7899e6dds1192b5f3bb3f7133@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-15T16:52:01Z","receivedAt":"2008-01-15T16:52:01Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 15 Jan 2008, Chris Ortman wrote:\n\n> Are you thinking to just create the standard patch but then regex \n> replace the necessary lines or something different?\n\nI was thinking exactly that.  TortoiseSVN's diff format is not important \nenough to git to merit a core-level change (in git), but it should be easy \nenough even to write a \"sed\" command line with three expressions to effect \nthe transformation you desire.\n\nCiao,\nDscho\n"},{"id":"65392","messageId":"c0f2d4110801150907y59593407u820c7b3db556ed31@mail.gmail.com","threadId":"11627","inReplyTo":"alpine.DEB.1.00.0801151650240.5289@eeepc-johanness","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Chris Ortman","fromEmail":"chrisortman@gmail.com","sentAt":"2008-01-15T17:07:24Z","receivedAt":"2008-01-15T17:07:24Z","isPatch":false,"sender":{"key":"chrisortman@gmail.com","avatar":"https://gravatar.com/avatar/eee0ef2ab483c4675dccfb3fa08623592c1bceda0adb93c766f56dfed0a23af8?d=mp&s=160"},"body":"Should this be a new command in git-svn.perl? or something in contrib?\n"},{"id":"65394","messageId":"478CE90E.1010807@obry.net","threadId":"11627","inReplyTo":"c0f2d4110801150758t68714570y83e1e74acbb67325@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2008-01-15T17:10:38Z","receivedAt":"2008-01-15T17:10:38Z","isPatch":false,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"Chris,\n\nYou want to use format-patch's --no-prefix option.\n\nPascal.\n\n-- \n\n--|------------------------------------------------------\n--| Pascal Obry                           Team-Ada Member\n--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE\n--|------------------------------------------------------\n--|              http://www.obry.net\n--| \"The best way to travel is by means of imagination\"\n--|\n--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595\n"},{"id":"65395","messageId":"alpine.DEB.1.00.0801151709330.5289@eeepc-johanness","threadId":"11627","inReplyTo":"c0f2d4110801150907y59593407u820c7b3db556ed31@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-15T17:11:11Z","receivedAt":"2008-01-15T17:11:11Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Him\n\nOn Tue, 15 Jan 2008, Chris Ortman wrote:\n\n> Should this be a new command in git-svn.perl? or something in contrib?\n\nI'd just start with an alias at first, and if it develops into something \nyou're happy with, send it here and let others comment on it -- also where \nit should go.\n\nPossibly the best place really would be git-svn, but it might also be less \ninteresting for other people, given that git-svn does not work in msysGit \nyet (and your use case was for TortoiseSVN, which is Windows-only).\n\nCiao,\nDscho\n"},{"id":"65401","messageId":"c0f2d4110801151104j4c34dekc7d06dcfc89bfbe6@mail.gmail.com","threadId":"11627","inReplyTo":"alpine.DEB.1.00.0801151709330.5289@eeepc-johanness","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Chris Ortman","fromEmail":"chrisortman@gmail.com","sentAt":"2008-01-15T19:04:23Z","receivedAt":"2008-01-15T19:04:23Z","isPatch":false,"sender":{"key":"chrisortman@gmail.com","avatar":"https://gravatar.com/avatar/eee0ef2ab483c4675dccfb3fa08623592c1bceda0adb93c766f56dfed0a23af8?d=mp&s=160"},"body":"Myself and many others have excellent luck with the cygwin version.\nBut the reasoning behind wanting this isn't so much for the developer\nthat is creating the patch as it is for the person receiving it. Most\nof the projects I work on use tortoise to apply the patches and don't\ntypically have patch.exe\n\nIf something like this was to be accepted and become part of standard\ngit is there a requirement that it be written in perl or is some other\nscripting language fine?\nThanks\n"},{"id":"65408","messageId":"478D1442.2090301@gmx.ch","threadId":"11627","inReplyTo":"c0f2d4110801150559x155ffabaj6bea52715522a070@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Jean-Luc Herren","fromEmail":"jlh@gmx.ch","sentAt":"2008-01-15T20:14:58Z","receivedAt":"2008-01-15T20:14:58Z","isPatch":false,"sender":{"key":"jlh@gmx.ch","avatar":null},"body":"Chris Ortman wrote:\n> Something that would really benefit the folks who use git to manage a\n> subversion repository (such as myself) would be a special format-patch\n> command for git-svn that creates a tortoise svn compatible diff file.\n\nIsn't it that TortoiseSVN is simply being too strict about the\ndiff format it accepts?  Since even GNU patch reads and applies\nthem fine (I didn't test it thoroughly though), I would assume git\ndiffs follow some sort of standard (couldn't find it though) for\nthe unified diff format, or at least was designed to not break\npatch.  So in the long term, I think this is rather or at least\nalso something to be addressed in TortoiseSVN.\n\njlh\n"},{"id":"65409","messageId":"20080115201530.GA17239@efreet.light.src","threadId":"11627","inReplyTo":"c0f2d4110801151104j4c34dekc7d06dcfc89bfbe6@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2008-01-15T20:15:30Z","receivedAt":"2008-01-15T20:15:30Z","isPatch":false,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Tue, Jan 15, 2008 at 13:04:23 -0600, Chris Ortman wrote:\n> Myself and many others have excellent luck with the cygwin version.\n> But the reasoning behind wanting this isn't so much for the developer\n> that is creating the patch as it is for the person receiving it. Most\n> of the projects I work on use tortoise to apply the patches and don't\n> typically have patch.exe\n\nNote, that tortoise might actually use the version numbers, so bonus points\nfor actually finding them (where applicable -- if the patch is not based on\nsubversion revision, you can't get them).\n\n> If something like this was to be accepted and become part of standard\n> git is there a requirement that it be written in perl or is some other\n> scripting language fine?\n\nGit currently uses C, shell, perl and tcl/tk. There would probably be some\nresistance to adding more dependencies, but that would not apply to the\ncontrib directory (so useful things written in something else are likely to\nend up there).\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"},{"id":"65412","messageId":"c0f2d4110801151230g5843df66t62fb659375a1680e@mail.gmail.com","threadId":"11627","inReplyTo":"478D1442.2090301@gmx.ch","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Chris Ortman","fromEmail":"chrisortman@gmail.com","sentAt":"2008-01-15T20:30:28Z","receivedAt":"2008-01-15T20:30:28Z","isPatch":false,"sender":{"key":"chrisortman@gmail.com","avatar":"https://gravatar.com/avatar/eee0ef2ab483c4675dccfb3fa08623592c1bceda0adb93c766f56dfed0a23af8?d=mp&s=160"},"body":"You are correct about Tortoise in that it is too strict.\nI looked through their code and they have written their own patch\nprogram which keys off these Index: lines\nhttp://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseMerge/Patch.cpp\n\nI think it could go either way as to if git-svn creates a different\nformat patch or tsvn accepts multiple formats, but I anticipated\ngit-svn would be easier to extend so I started here.\n"},{"id":"65435","messageId":"alpine.LNX.1.00.0801151728120.13593@iabervon.org","threadId":"11627","inReplyTo":"c0f2d4110801150758t68714570y83e1e74acbb67325@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-01-15T23:11:37Z","receivedAt":"2008-01-15T23:11:37Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 15 Jan 2008, Chris Ortman wrote:\n\n> The format that TortoiseSVN expects is the same as the format of svn diff.\n> The most apparent differences are\n> \n> diff --git a/Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\n> b/Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\n> \n> becomes\n> \n> Index: Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\n\nWhen --no-prefix is used, we should probably do:\n\nIndex: <filename>\n\ninstead of\n\ndiff --git <filename> <filename>\n\nIf nothing else, --no-prefix generates patches that git-apply can't apply \nbut thinks that it should be able to because of the \"diff --git\" line.\n\n> and\n> \n> index a0a0d38..9676e16 100644\n> \n> becomes\n> \n> ===================================================================\n\nCan't tell if this matters, or if this is meant to underline the Index \nline, and if we can leave some extra info after it. The source link you \nsent requires a login; is this line actually important to recognition, or \nis it just different in the generated patches?\n\n> and\n> \n> --- a/Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\n> +++ b/Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\n> \n> becomes\n> \n> --- Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\t(revision 4715)\n> +++ Facilities/EventWiring/Castle.Facilities.EventWiring.Tests/Castle.Facilities.EventWiring.Tests-vs2005.csproj\t(working copy)\n\nThis (putting a description of the revision at the end) would be nice in \ngeneral for those of us who can't remember what arguments we gave to git \ndiff and can't get back to them without quitting less and no longer having \nthe diff.\n\nOf course, it would take a lot of magic to get git to describe things with \nthe svn revision info in a non-svn-specific command, but that may not be \nnecessary if tortoise is willing to apply patches where the base revision \nis unknown. Or git-svn could just make a lot of tags like \"revision 4715\".\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"65442","messageId":"7vhched3kw.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LNX.1.00.0801151728120.13593@iabervon.org","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-16T00:19:43Z","receivedAt":"2008-01-16T00:19:43Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> When --no-prefix is used, we should probably do:\n>\n> Index: <filename>\n>\n> instead of\n>\n> diff --git <filename> <filename>\n>\n> If nothing else, --no-prefix generates patches that git-apply can't apply \n> but thinks that it should be able to because of the \"diff --git\" line.\n\nWhile I do not necessarily agree with that \"Index: <filename>\"\nthing, I think dropping \"--git\" from there is probably a good\nidea, as that is clearly not \"--git\" patch meant to be fed to\ngit-apply.\n\nActually I vaguely recall somebody suggested that we drop\n\"--git\" if any nonstandard --src-prefix and --dst-prefix, but\nsorry I do not recall the details (I am a bit sick today).  I\nguess somehow we did not heed that wise advise and accepted the\nchange as-is, and that new feature ended up with a half-baked\nhack that did not consider its consequences X-<.\n"},{"id":"65447","messageId":"7v4pded1rk.fsf_-_@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"7vhched3kw.fsf@gitster.siamese.dyndns.org","subject":"[PATCH/RFC] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-16T00:58:55Z","receivedAt":"2008-01-16T00:58:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"If a non-standard prefix is used by --no-prefix, --src-prefix,\nor --dst-prefix options, the resulting diff becomes something\ngit-apply would not grok.  In such a case, we should not trigger\nthe more strict check git-apply does for \"diff --git\" format. \n\nThis checks the prefix specified when generating diff and if src\nand dst prefix are not one-level of directory name followed by a\nslash (i.e. the standard \"diff --git a/foo b/foo\" is fine, a\ncustom \"diff --git l/foo k/foo\" is Ok, but \"diff --git foo foo\"\nis NOT Ok).\n\n---\n diff.c |   52 ++++++++++++++++++++++++++++++++++++++++------------\n 1 files changed, 40 insertions(+), 12 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex b18c140..8126a74 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1233,6 +1233,18 @@ static const char *diff_funcname_pattern(struct diff_filespec *one)\n \treturn NULL;\n }\n \n+static int with_standard_prefix(struct diff_options *o)\n+{\n+\tconst char *slash;\n+\tslash = strchr(o->a_prefix, '/');\n+\tif (!slash || slash[1])\n+\t\treturn 0;\n+\tslash = strchr(o->b_prefix, '/');\n+\tif (!slash || slash[1])\n+\t\treturn 0;\n+\treturn 1;\n+}\n+\n static void builtin_diff(const char *name_a,\n \t\t\t const char *name_b,\n \t\t\t struct diff_filespec *one,\n@@ -1246,30 +1258,46 @@ static void builtin_diff(const char *name_a,\n \tchar *a_one, *b_two;\n \tconst char *set = diff_get_color_opt(o, DIFF_METAINFO);\n \tconst char *reset = diff_get_color_opt(o, DIFF_RESET);\n+\tint is_git_diff = with_standard_prefix(o);\n \n \ta_one = quote_two(o->a_prefix, name_a + (*name_a == '/'));\n \tb_two = quote_two(o->b_prefix, name_b + (*name_b == '/'));\n \tlbl[0] = DIFF_FILE_VALID(one) ? a_one : \"/dev/null\";\n \tlbl[1] = DIFF_FILE_VALID(two) ? b_two : \"/dev/null\";\n-\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n+\n+\tif (!is_git_diff)\n+\t\tprintf(\"%sIndex: %s%s\\n\", set, b_two, reset);\n+\telse\n+\t\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n+\n \tif (lbl[0][0] == '/') {\n \t\t/* /dev/null */\n-\t\tprintf(\"%snew file mode %06o%s\\n\", set, two->mode, reset);\n-\t\tif (xfrm_msg && xfrm_msg[0])\n-\t\t\tprintf(\"%s%s%s\\n\", set, xfrm_msg, reset);\n+\t\tif (is_git_diff) {\n+\t\t\tprintf(\"%snew file mode %06o%s\\n\",\n+\t\t\t       set, two->mode, reset);\n+\t\t\tif (xfrm_msg && xfrm_msg[0])\n+\t\t\t\tprintf(\"%s%s%s\\n\", set, xfrm_msg, reset);\n+\t\t}\n \t}\n \telse if (lbl[1][0] == '/') {\n-\t\tprintf(\"%sdeleted file mode %06o%s\\n\", set, one->mode, reset);\n-\t\tif (xfrm_msg && xfrm_msg[0])\n-\t\t\tprintf(\"%s%s%s\\n\", set, xfrm_msg, reset);\n+\t\tif (is_git_diff) {\n+\t\t\tprintf(\"%sdeleted file mode %06o%s\\n\",\n+\t\t\t       set, one->mode, reset);\n+\t\t\tif (xfrm_msg && xfrm_msg[0])\n+\t\t\t\tprintf(\"%s%s%s\\n\", set, xfrm_msg, reset);\n+\t\t}\n \t}\n \telse {\n-\t\tif (one->mode != two->mode) {\n-\t\t\tprintf(\"%sold mode %06o%s\\n\", set, one->mode, reset);\n-\t\t\tprintf(\"%snew mode %06o%s\\n\", set, two->mode, reset);\n+\t\tif (is_git_diff) {\n+\t\t\tif (one->mode != two->mode) {\n+\t\t\t\tprintf(\"%sold mode %06o%s\\n\",\n+\t\t\t\t       set, one->mode, reset);\n+\t\t\t\tprintf(\"%snew mode %06o%s\\n\",\n+\t\t\t\t       set, two->mode, reset);\n+\t\t\t}\n+\t\t\tif (xfrm_msg && xfrm_msg[0])\n+\t\t\t\tprintf(\"%s%s%s\\n\", set, xfrm_msg, reset);\n \t\t}\n-\t\tif (xfrm_msg && xfrm_msg[0])\n-\t\t\tprintf(\"%s%s%s\\n\", set, xfrm_msg, reset);\n \t\t/*\n \t\t * we do not run diff between different kind\n \t\t * of objects.\n"},{"id":"65455","messageId":"alpine.LSU.1.00.0801160133150.17650@racer.site","threadId":"11627","inReplyTo":"7v4pded1rk.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH/RFC] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-16T01:37:48Z","receivedAt":"2008-01-16T01:37:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 15 Jan 2008, Junio C Hamano wrote:\n\n> diff --git a/diff.c b/diff.c\n> index b18c140..8126a74 100644\n> --- a/diff.c\n> +++ b/diff.c\n> @@ -1246,30 +1258,46 @@ static void builtin_diff(const char *name_a,\n>  \tchar *a_one, *b_two;\n>  \tconst char *set = diff_get_color_opt(o, DIFF_METAINFO);\n>  \tconst char *reset = diff_get_color_opt(o, DIFF_RESET);\n> +\tint is_git_diff = with_standard_prefix(o);\n>  \n>  \ta_one = quote_two(o->a_prefix, name_a + (*name_a == '/'));\n>  \tb_two = quote_two(o->b_prefix, name_b + (*name_b == '/'));\n>  \tlbl[0] = DIFF_FILE_VALID(one) ? a_one : \"/dev/null\";\n>  \tlbl[1] = DIFF_FILE_VALID(two) ? b_two : \"/dev/null\";\n> -\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n> +\n> +\tif (!is_git_diff)\n> +\t\tprintf(\"%sIndex: %s%s\\n\", set, b_two, reset);\n> +\telse\n> +\t\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n> +\n\nHmm.  AFAICT plain diff outputs \"diff ...\", not \"Index: ...\".  IMHO doing \nhalf of what SVN does, and half what GNU diff does, but not completely \nwhat something else does, does not help anybody.\n\nSo I'm mildly negative on this hunk.\n\nAlso, I am not quite sure what to do about the \"rename from\" and \"copy \nfrom\" headers... The \"--git\" was always an indication that this patch may \ncontain something like these headers.\n\nAll in all, I think this would be too much.  Let's just keep our patch \nformat, and if anybody else is not able to grok unified diffs as we output \nthem, have a transformer.  Let's not have git core affected.\n\nCiao,\nDscho\n"},{"id":"65457","messageId":"7vir1ubl0g.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LSU.1.00.0801160133150.17650@racer.site","subject":"Re: [PATCH/RFC] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-16T01:46:07Z","receivedAt":"2008-01-16T01:46:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> diff --git a/diff.c b/diff.c\n>> index b18c140..8126a74 100644\n>> --- a/diff.c\n>> +++ b/diff.c\n>> @@ -1246,30 +1258,46 @@ static void builtin_diff(const char *name_a,\n>>  \tchar *a_one, *b_two;\n>>  \tconst char *set = diff_get_color_opt(o, DIFF_METAINFO);\n>>  \tconst char *reset = diff_get_color_opt(o, DIFF_RESET);\n>> +\tint is_git_diff = with_standard_prefix(o);\n>>  \n>>  \ta_one = quote_two(o->a_prefix, name_a + (*name_a == '/'));\n>>  \tb_two = quote_two(o->b_prefix, name_b + (*name_b == '/'));\n>>  \tlbl[0] = DIFF_FILE_VALID(one) ? a_one : \"/dev/null\";\n>>  \tlbl[1] = DIFF_FILE_VALID(two) ? b_two : \"/dev/null\";\n>> -\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n>> +\n>> +\tif (!is_git_diff)\n>> +\t\tprintf(\"%sIndex: %s%s\\n\", set, b_two, reset);\n>> +\telse\n>> +\t\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n>> +\n>\n> Hmm.  AFAICT plain diff outputs \"diff ...\", not \"Index: ...\".  IMHO doing \n> half of what SVN does, and half what GNU diff does, but not completely \n> what something else does, does not help anybody.\n>\n> So I'm mildly negative on this hunk.\n\nYou misread the intention of the patch.\n\nThis whole point of this RFC patch is about not labelling a\nnon-git patch that results from --no-prefix with \"diff --git\".\nAs I said in my reply to Daniel, I do not like \"Index:\" myself,\nand doing printf(\"diff %s %s\\n\", a_one, b_two) instead would be\nperfectly fine by me.\n\nI do not mind keeping the metainformation such as rename/deleted\nlabels in the output of non-git case (iow, dropping all the\nother hunks that pay attention to is_git_diff in the RFC patch).\nAs long as the patch is not labelled with \"diff --git\", stricter\nchecks in git-apply will not trigger, and it knows to skip these\nnon-patch lines.  Also a plain GNU patch would ignore those\nmetainformation lines, so there is no strong reason to remove\nthem from the output, unless somebody wants to use non patch non\ngit tool that is stricter for no good reason (and I'd agree with\nyou that the solution to such a tool is a postprocessing filter\noutside of git).\n"},{"id":"65458","messageId":"alpine.LSU.1.00.0801160152540.17650@racer.site","threadId":"11627","inReplyTo":"7vir1ubl0g.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH/RFC] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-16T01:53:51Z","receivedAt":"2008-01-16T01:53:51Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 15 Jan 2008, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> >> diff --git a/diff.c b/diff.c\n> >> index b18c140..8126a74 100644\n> >> --- a/diff.c\n> >> +++ b/diff.c\n> >> @@ -1246,30 +1258,46 @@ static void builtin_diff(const char *name_a,\n> >>  \tchar *a_one, *b_two;\n> >>  \tconst char *set = diff_get_color_opt(o, DIFF_METAINFO);\n> >>  \tconst char *reset = diff_get_color_opt(o, DIFF_RESET);\n> >> +\tint is_git_diff = with_standard_prefix(o);\n> >>  \n> >>  \ta_one = quote_two(o->a_prefix, name_a + (*name_a == '/'));\n> >>  \tb_two = quote_two(o->b_prefix, name_b + (*name_b == '/'));\n> >>  \tlbl[0] = DIFF_FILE_VALID(one) ? a_one : \"/dev/null\";\n> >>  \tlbl[1] = DIFF_FILE_VALID(two) ? b_two : \"/dev/null\";\n> >> -\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n> >> +\n> >> +\tif (!is_git_diff)\n> >> +\t\tprintf(\"%sIndex: %s%s\\n\", set, b_two, reset);\n> >> +\telse\n> >> +\t\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n> >> +\n> >\n> > Hmm.  AFAICT plain diff outputs \"diff ...\", not \"Index: ...\".  IMHO doing \n> > half of what SVN does, and half what GNU diff does, but not completely \n> > what something else does, does not help anybody.\n> >\n> > So I'm mildly negative on this hunk.\n> \n> You misread the intention of the patch.\n> \n> This whole point of this RFC patch is about not labelling a non-git \n> patch that results from --no-prefix with \"diff --git\". As I said in my \n> reply to Daniel, I do not like \"Index:\" myself, and doing printf(\"diff \n> %s %s\\n\", a_one, b_two) instead would be perfectly fine by me.\n\nWell, I commented on this hunk specifically, and think that the intention \nof the patch would be better served by just conditionally omitting \n\"--git\", and nothing else.\n\n> I do not mind keeping the metainformation such as rename/deleted labels \n> in the output of non-git case (iow, dropping all the other hunks that \n> pay attention to is_git_diff in the RFC patch). As long as the patch is \n> not labelled with \"diff --git\", stricter checks in git-apply will not \n> trigger, and it knows to skip these non-patch lines.  Also a plain GNU \n> patch would ignore those metainformation lines, so there is no strong \n> reason to remove them from the output, unless somebody wants to use non \n> patch non git tool that is stricter for no good reason (and I'd agree \n> with you that the solution to such a tool is a postprocessing filter \n> outside of git).\n\nFair enough.\n\nCiao,\nDscho\n"},{"id":"65460","messageId":"c0f2d4110801151801o941d8f7i3ec11668f7948b62@mail.gmail.com","threadId":"11627","inReplyTo":"alpine.LNX.1.00.0801151728120.13593@iabervon.org","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Chris Ortman","fromEmail":"chrisortman@gmail.com","sentAt":"2008-01-16T02:01:47Z","receivedAt":"2008-01-16T02:01:47Z","isPatch":false,"sender":{"key":"chrisortman@gmail.com","avatar":"https://gravatar.com/avatar/eee0ef2ab483c4675dccfb3fa08623592c1bceda0adb93c766f56dfed0a23af8?d=mp&s=160"},"body":"I'm sorry I completely forgot there was username / password on that link\nusername: guest\npassword: ''\n\nTortoise does care about the line of equals signs, although it seems\nlike an unecessary one from my understanding.\n\n>From the best I can tell it doesn't look like tortoise actually cares\nthat the svn revision be something valid, just that something is there\nas a placeholder\n"},{"id":"65461","messageId":"alpine.LNX.1.00.0801152056030.13593@iabervon.org","threadId":"11627","inReplyTo":"alpine.LSU.1.00.0801160152540.17650@racer.site","subject":"Re: [PATCH/RFC] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-01-16T02:04:24Z","receivedAt":"2008-01-16T02:04:24Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Wed, 16 Jan 2008, Johannes Schindelin wrote:\n\n> Hi,\n> \n> On Tue, 15 Jan 2008, Junio C Hamano wrote:\n> \n> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> > \n> > >> diff --git a/diff.c b/diff.c\n> > >> index b18c140..8126a74 100644\n> > >> --- a/diff.c\n> > >> +++ b/diff.c\n> > >> @@ -1246,30 +1258,46 @@ static void builtin_diff(const char *name_a,\n> > >>  \tchar *a_one, *b_two;\n> > >>  \tconst char *set = diff_get_color_opt(o, DIFF_METAINFO);\n> > >>  \tconst char *reset = diff_get_color_opt(o, DIFF_RESET);\n> > >> +\tint is_git_diff = with_standard_prefix(o);\n> > >>  \n> > >>  \ta_one = quote_two(o->a_prefix, name_a + (*name_a == '/'));\n> > >>  \tb_two = quote_two(o->b_prefix, name_b + (*name_b == '/'));\n> > >>  \tlbl[0] = DIFF_FILE_VALID(one) ? a_one : \"/dev/null\";\n> > >>  \tlbl[1] = DIFF_FILE_VALID(two) ? b_two : \"/dev/null\";\n> > >> -\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n> > >> +\n> > >> +\tif (!is_git_diff)\n> > >> +\t\tprintf(\"%sIndex: %s%s\\n\", set, b_two, reset);\n> > >> +\telse\n> > >> +\t\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n> > >> +\n> > >\n> > > Hmm.  AFAICT plain diff outputs \"diff ...\", not \"Index: ...\".  IMHO doing \n> > > half of what SVN does, and half what GNU diff does, but not completely \n> > > what something else does, does not help anybody.\n> > >\n> > > So I'm mildly negative on this hunk.\n> > \n> > You misread the intention of the patch.\n> > \n> > This whole point of this RFC patch is about not labelling a non-git \n> > patch that results from --no-prefix with \"diff --git\". As I said in my \n> > reply to Daniel, I do not like \"Index:\" myself, and doing printf(\"diff \n> > %s %s\\n\", a_one, b_two) instead would be perfectly fine by me.\n> \n> Well, I commented on this hunk specifically, and think that the intention \n> of the patch would be better served by just conditionally omitting \n> \"--git\", and nothing else.\n\nAt most, I think, if a_one and b_two are identical, we could use the \n\"Index:\" form, since \"diff -ur something something\" is weird (how can \n\"something\" be different from itself?). If they're different, definitely \nuse \"diff %s %s\".\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"65462","messageId":"7v7iiabjyh.fsf_-_@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"7v4pded1rk.fsf_-_@gitster.siamese.dyndns.org","subject":"[PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-16T02:08:54Z","receivedAt":"2008-01-16T02:08:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"If a non-standard prefix is used by --no-prefix, --src-prefix,\nor --dst-prefix options, the resulting diff becomes something\ngit-apply would not grok.  In such a case, we should not trigger\nthe more strict check git-apply does for patches in \"diff --git\"\nformat.\n\nThis checks the prefix specified when generating diff.  If src\nand dst prefix are not one-level of directory name followed by a\nslash (i.e. the standard \"diff --git a/foo b/foo\" is fine, a\ncustom \"diff --git l/foo k/foo\" is Ok, but \"diff --git foo foo\"\nis NOT Ok), we are generating with a custom prefix that would\nfail git-apply's stricter check.  In such a case, we do not say\n\"diff --git\" but just say \"diff\" in the header.\n\nMetainformation (e.g. \"index\", \"similarity\", etc.) lines will\nsafely be ignored by patch and git-apply (even when the latter\nparses a non-git diff output), so this patch does not bother\nstripping them away.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * I am signing this off, but I am not thinking straight today\n   and did not test it, so I will not commit it for now and\n   leave it in the list archive, to be commented on.\n\n diff.c |   17 ++++++++++++++++-\n 1 files changed, 16 insertions(+), 1 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex b18c140..8321492 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1233,6 +1233,18 @@ static const char *diff_funcname_pattern(struct diff_filespec *one)\n \treturn NULL;\n }\n \n+static int with_standard_prefix(struct diff_options *o)\n+{\n+\tconst char *slash;\n+\tslash = strchr(o->a_prefix, '/');\n+\tif (!slash || slash[1])\n+\t\treturn 0;\n+\tslash = strchr(o->b_prefix, '/');\n+\tif (!slash || slash[1])\n+\t\treturn 0;\n+\treturn 1;\n+}\n+\n static void builtin_diff(const char *name_a,\n \t\t\t const char *name_b,\n \t\t\t struct diff_filespec *one,\n@@ -1246,12 +1258,15 @@ static void builtin_diff(const char *name_a,\n \tchar *a_one, *b_two;\n \tconst char *set = diff_get_color_opt(o, DIFF_METAINFO);\n \tconst char *reset = diff_get_color_opt(o, DIFF_RESET);\n+\tconst char *gitdiff;\n+\n+\tgitdiff = with_standard_prefix(o) ? \" --git\" : \"\";\n \n \ta_one = quote_two(o->a_prefix, name_a + (*name_a == '/'));\n \tb_two = quote_two(o->b_prefix, name_b + (*name_b == '/'));\n \tlbl[0] = DIFF_FILE_VALID(one) ? a_one : \"/dev/null\";\n \tlbl[1] = DIFF_FILE_VALID(two) ? b_two : \"/dev/null\";\n-\tprintf(\"%sdiff --git %s %s%s\\n\", set, a_one, b_two, reset);\n+\tprintf(\"%sdiff%s %s %s%s\\n\", set, gitdiff, a_one, b_two, reset);\n \tif (lbl[0][0] == '/') {\n \t\t/* /dev/null */\n \t\tprintf(\"%snew file mode %06o%s\\n\", set, two->mode, reset);\n"},{"id":"65463","messageId":"7v63xutt0h.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LNX.1.00.0801152056030.13593@iabervon.org","subject":"Re: [PATCH/RFC] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-16T02:15:58Z","receivedAt":"2008-01-16T02:15:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> At most, I think, if a_one and b_two are identical, we could use the \n> \"Index:\" form, since \"diff -ur something something\" is weird (how can \n> \"something\" be different from itself?).\n\nI think you can have --src-prefix=a- --dst-prefix=b- and see\n\"diff a-foo b-foo\" ;-).  I really do not care much either way,\nas long as it does not say \"diff --git\".\n\nThis is also an offtopic remark but I have been wondering how\nsafe those fake \"diff --git\" output people seem to be able to\nget out of recent-enough Hg.\n"},{"id":"65464","messageId":"alpine.LNX.1.00.0801152109580.13593@iabervon.org","threadId":"11627","inReplyTo":"c0f2d4110801151230g5843df66t62fb659375a1680e@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-01-16T02:20:52Z","receivedAt":"2008-01-16T02:20:52Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 15 Jan 2008, Chris Ortman wrote:\n\n> You are correct about Tortoise in that it is too strict.\n> I looked through their code and they have written their own patch\n> program which keys off these Index: lines\n> http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseMerge/Patch.cpp\n> \n> I think it could go either way as to if git-svn creates a different\n> format patch or tsvn accepts multiple formats, but I anticipated\n> git-svn would be easier to extend so I started here.\n\nI think it would be worthwhile for tsvn to be less picky in some ways. It \nshould at least be able to accept GNU diff, since sometimes people send \nmaintainers patches prepared by hand (diff -u file.c.orig file.c), and \nthere are comments in there that suggest that they're trying to support \nnon-svn-generated diffs, although they seem to think that such diffs look \nlike:\n\nIndex: filename\n============\n@@ -xxx,xxx +xxx,xxx @@\n...\n\nwhich isn't anything I've ever seen. You're much more likely to get:\n\n...junk...\n--- junk\n+++ filename\tjunk\n@@ -xxx,xxx +xxx,xxx @@\n\nAnd that should be easy enough to parse as an alternative format in tsvn. \n(I'd send them a patch to do it, but they wouldn't be able to apply it...)\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"65467","messageId":"alpine.LFD.1.00.0801151902080.2806@woody.linux-foundation.org","threadId":"11627","inReplyTo":"7v7iiabjyh.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-01-16T03:09:51Z","receivedAt":"2008-01-16T03:09:51Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 15 Jan 2008, Junio C Hamano wrote:\n>\n> If a non-standard prefix is used by --no-prefix, --src-prefix,\n> or --dst-prefix options, the resulting diff becomes something\n> git-apply would not grok.  In such a case, we should not trigger\n> the more strict check git-apply does for patches in \"diff --git\"\n> format.\n\nI think this is wrong.\n\nIf we do any git-specific stuff, we need to have that \"--git\" thing there. \nThat is *not* just limited to the prefix, but to all the other things git \ndiffs can do: renames, mode changes, etc.\n\n> Metainformation (e.g. \"index\", \"similarity\", etc.) lines will\n> safely be ignored by patch and git-apply (even when the latter\n> parses a non-git diff output), so this patch does not bother\n> stripping them away.\n\nIt's not necessarily safe to ignore some of them, like the rename info. If \nyou see a rename patch and don't understand it as a rename, it's \npointless.\n\nSo I would argue that you need something stronger to say \"don't do a git \ndiff\", and that should also disallow rename detection at a minimum. Quite \nfrankly, any program that is so stupid as to not accept current git \npatches (ie TortoiseSVN), then we damn well shouldn't just disable the \nmost trivial part of it. We should make sure that we do not enable *any* \nof the rather important extensions: even if ToirtoiseSVN would ignore \nthem, if ignoring them means that it mis-understands the diff, it \nshouldn't be allowed at all.\n\nSo maybe a --standard-diff option that removes the \"--git\" part, but also \nremoves everything else.\n\nAnd add a \"--index-header\" to enable the (totally *idiotic*) \"Index:\" \nprefix that is such a total waste of time that it's not even funny (ie it \ncannot do renames, which makes it entirely pointless). \n\nWe do not want to make it particularly easy for people to create \nmind-bogglingly stupid diff output. \n\n\t\tLinus\n"},{"id":"65470","messageId":"alpine.LFD.1.00.0801151919440.2806@woody.linux-foundation.org","threadId":"11627","inReplyTo":"alpine.LFD.1.00.0801151902080.2806@woody.linux-foundation.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-01-16T03:26:06Z","receivedAt":"2008-01-16T03:26:06Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 15 Jan 2008, Linus Torvalds wrote:\n> \n> If we do any git-specific stuff, we need to have that \"--git\" thing there. \n> That is *not* just limited to the prefix, but to all the other things git \n> diffs can do: renames, mode changes, etc.\n\nSide note: the fact that git-apply itself might have issues with a \n\"--no-prefix\" patch is really a red herring, because while it's true that \nyou would normally not do it for git, it's even more true that we haven't \nactually started teaching git about it and the cases where you *would* use \nit (eg recursive subproject diffs etc).\n\nSo I do not think it's true that \"--no-prefix\" (or --src/dst-prefix) \nnecessarily implies \"no-git\" at all. It *can* do so, but it's not a given \nthing, and almost certainly isn't in the long run with submodule support. \n\nSo it would be kind of sad if we mixed it up with the prefix decision, \nwhen it really is something totally separate. Many other SCM's may want a \nsimple \"-p1\" patch (BK did, for example), and that doesn't make them \nparticularly \"git-like\". And conversely, git itself will want more than a \nsimple \"-p1\" patch for subproject handling.\n\n\t\tLinus\n"},{"id":"65472","messageId":"alpine.LNX.1.00.0801152226000.13593@iabervon.org","threadId":"11627","inReplyTo":"alpine.LFD.1.00.0801151902080.2806@woody.linux-foundation.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-01-16T03:56:14Z","receivedAt":"2008-01-16T03:56:14Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 15 Jan 2008, Linus Torvalds wrote:\n\n> On Tue, 15 Jan 2008, Junio C Hamano wrote:\n> >\n> > If a non-standard prefix is used by --no-prefix, --src-prefix,\n> > or --dst-prefix options, the resulting diff becomes something\n> > git-apply would not grok.  In such a case, we should not trigger\n> > the more strict check git-apply does for patches in \"diff --git\"\n> > format.\n> \n> I think this is wrong.\n> \n> If we do any git-specific stuff, we need to have that \"--git\" thing there. \n> That is *not* just limited to the prefix, but to all the other things git \n> diffs can do: renames, mode changes, etc.\n\nWell, part of the issue is that, if you drop the prefix, then *git* can't \nunderstand the resulting patch (because --git causes git-apply to use \nopen-coded -p1 handling of names, which won't be right).\n\nI suppose the other option is to have the header in this case be:\n\ndiff --git --src-prefix= --dst-prefix= filename filename\n\nso that apply can figure out what diff did correctly.\n\n> > Metainformation (e.g. \"index\", \"similarity\", etc.) lines will\n> > safely be ignored by patch and git-apply (even when the latter\n> > parses a non-git diff output), so this patch does not bother\n> > stripping them away.\n> \n> It's not necessarily safe to ignore some of them, like the rename info. If \n> you see a rename patch and don't understand it as a rename, it's \n> pointless.\n> \n> So I would argue that you need something stronger to say \"don't do a git \n> diff\", and that should also disallow rename detection at a minimum. Quite \n> frankly, any program that is so stupid as to not accept current git \n> patches (ie TortoiseSVN), then we damn well shouldn't just disable the \n> most trivial part of it. We should make sure that we do not enable *any* \n> of the rather important extensions: even if ToirtoiseSVN would ignore \n> them, if ignoring them means that it mis-understands the diff, it \n> shouldn't be allowed at all.\n> \n> So maybe a --standard-diff option that removes the \"--git\" part, but also \n> removes everything else.\n\nThat seems wise to me. We should be able to generate patches that are \naccessible to programs that can't follow any clever instructions. I think \nthe point of the \"Index:\" header is that these programs will freak out if \ntwo filenames don't match (or, more likely, break in some way), and it \nmeans you can't sensibly generate patches that upset them for deletes or \ncreates.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"65475","messageId":"alpine.LNX.1.00.0801152256480.13593@iabervon.org","threadId":"11627","inReplyTo":"alpine.LFD.1.00.0801151919440.2806@woody.linux-foundation.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-01-16T04:04:21Z","receivedAt":"2008-01-16T04:04:21Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 15 Jan 2008, Linus Torvalds wrote:\n\n> On Tue, 15 Jan 2008, Linus Torvalds wrote:\n> > \n> > If we do any git-specific stuff, we need to have that \"--git\" thing there. \n> > That is *not* just limited to the prefix, but to all the other things git \n> > diffs can do: renames, mode changes, etc.\n> \n> Side note: the fact that git-apply itself might have issues with a \n> \"--no-prefix\" patch is really a red herring, because while it's true that \n> you would normally not do it for git, it's even more true that we haven't \n> actually started teaching git about it and the cases where you *would* use \n> it (eg recursive subproject diffs etc).\n>\n> So I do not think it's true that \"--no-prefix\" (or --src/dst-prefix) \n> necessarily implies \"no-git\" at all. It *can* do so, but it's not a given \n> thing, and almost certainly isn't in the long run with submodule support. \n\nI don't think --no-prefix is sufficient for submodules; it means that \ngit-apply will accidentally remove exactly one level, but if your \nsubmodule is two directory levels down, it won't work, and having the \neffective prefixes be \"gitweb\" and \"gitweb\" is a little hackish. You'd \nreally want to generate a -p1 patch whose root is shifted from the actual \nproject root, not a -p0 patch or -p2 patch or something.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"65480","messageId":"7vy7aqs8r4.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LFD.1.00.0801151902080.2806@woody.linux-foundation.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-16T04:18:55Z","receivedAt":"2008-01-16T04:18:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> We do not want to make it particularly easy for people to create \n> mind-bogglingly stupid diff output. \n\nAlthough the discussion was triggered by that Tortoise thing,\nthe RFC patch was not about helping that.  That's a new feature\nasked long after we went into rc freeze, and I am not interested\nin discussing such a feature, especially when I am sick.\n\nThe only objective was to make sure that a patch that is not\nkosher in git-apply's eyes is not marked with \"diff --git\";\notherwise, its output will confuse git-apply.  As --no-prefix\nwill be a new feature in 1.5.4, we would be shipping with a\nknown-to-be-bad new feature that is --no-prefix, unless we do\nsomething about it.  Fixing that breakage was the sole\nmotivation behind my patch.\n\nI think a reasonable short-term solution might be to disable any\ngit specific stuff (renames, rewrites, etc) when --no-prefix and\nits friends are used, along with the patch you are commenting on\nto remove \" --git\" from the header.  That would at least make\nsure that the --no-prefix feature is safe.\n"},{"id":"65482","messageId":"alpine.LFD.1.00.0801152017490.2806@woody.linux-foundation.org","threadId":"11627","inReplyTo":"alpine.LNX.1.00.0801152256480.13593@iabervon.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-01-16T04:22:11Z","receivedAt":"2008-01-16T04:22:11Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 15 Jan 2008, Daniel Barkalow wrote:\n> \n> I don't think --no-prefix is sufficient for submodules; it means that \n> git-apply will accidentally remove exactly one level, but if your \n> submodule is two directory levels down, it won't work, and having the \n> effective prefixes be \"gitweb\" and \"gitweb\" is a little hackish. You'd \n> really want to generate a -p1 patch whose root is shifted from the actual \n> project root, not a -p0 patch or -p2 patch or something.\n\n.. and this is *exactly* what\n\n\tcd gitweb\n\tgit diff --src-prefix=a/gitweb/ --dst-prefix=b/gitweb/ \n\nwould do (obviously people wouldn't do this by hand - it would be \nsomething that is done by the \"git diff\" hitting a subproject).\n\nThe point is, Junio's patch suggestion tied that prefix together with the \n\"gitness\" of the patch, so Junio's patch would have broken the above: git \nwould decide that since it's not a standard -p1 prefix, it's not a git \ndiff, so it shouldn't have \"--git\" in it.\n\nThat's why tying \"--git\" together with any prefix handling is wrong: \nbecause it's a totally different issue. It's true that \"git-apply\" right \nnow doesn't understand these things, but assuming we want to teach \ngit-apply to apply to subprojects eventually (we do, don't we?) we'll \neventually have to teach it.\n\n\t\t\tLinus\n"},{"id":"65500","messageId":"buo3asymfvh.fsf@dhapc248.dev.necel.com","threadId":"11627","inReplyTo":"20080115201530.GA17239@efreet.light.src","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Miles Bader","fromEmail":"miles.bader@necel.com","sentAt":"2008-01-16T06:41:38Z","receivedAt":"2008-01-16T06:41:38Z","isPatch":false,"sender":{"key":"miles.bader@necel.com","avatar":"https://gravatar.com/avatar/be062d4050eb88e04229cbdb60f803e1bd647923a015996c2439e76f23e336a7?d=mp&s=160"},"body":"Jan Hudec <bulb@ucw.cz> writes:\n> Git currently uses C, shell, perl and tcl/tk. There would probably be some\n> resistance to adding more dependencies, but that would not apply to the\n> contrib directory (so useful things written in something else are likely to\n> end up there).\n\nIs tcl/tk restricted to the GUI stuff?\n\n-Miles\n\n-- \nA zen-buddhist walked into a pizza shop and\nsaid, \"Make me one with everything.\"\n"},{"id":"65501","messageId":"20080116065412.GP24004@spearce.org","threadId":"11627","inReplyTo":"buo3asymfvh.fsf@dhapc248.dev.necel.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-01-16T06:54:12Z","receivedAt":"2008-01-16T06:54:12Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Miles Bader <miles.bader@necel.com> wrote:\n> Jan Hudec <bulb@ucw.cz> writes:\n> > Git currently uses C, shell, perl and tcl/tk. There would probably be some\n> > resistance to adding more dependencies, but that would not apply to the\n> > contrib directory (so useful things written in something else are likely to\n> > end up there).\n> \n> Is tcl/tk restricted to the GUI stuff?\n\nYes.  Currently the only users of Tcl (or Tk) within the core\nGit distribution is gitk and git-gui.\n\n-- \nShawn.\n"},{"id":"65561","messageId":"7vhchdsn0y.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LFD.1.00.0801151919440.2806@woody.linux-foundation.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-16T17:22:53Z","receivedAt":"2008-01-16T17:22:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> So I do not think it's true that \"--no-prefix\" (or --src/dst-prefix) \n> necessarily implies \"no-git\" at all. It *can* do so, but it's not a given \n> thing, and almost certainly isn't in the long run with submodule support. \n>\n> So it would be kind of sad if we mixed it up with the prefix decision, \n> when it really is something totally separate. Many other SCM's may want a \n> simple \"-p1\" patch (BK did, for example), and that doesn't make them \n> particularly \"git-like\". And conversely, git itself will want more than a \n> simple \"-p1\" patch for subproject handling.\n\nOk.  That's a sensible argument.\n"},{"id":"65596","messageId":"7v1w8hploy.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LFD.1.00.0801152017490.2806@woody.linux-foundation.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-16T20:19:57Z","receivedAt":"2008-01-16T20:19:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> That's why tying \"--git\" together with any prefix handling is wrong: \n> because it's a totally different issue. It's true that \"git-apply\" right \n> now doesn't understand these things, but assuming we want to teach \n> git-apply to apply to subprojects eventually (we do, don't we?) we'll \n> eventually have to teach it.\n\nThat's all correct but\n\n * currently diff does not recurse, nor apply does not apply\n   recursively;\n\n * \"git diff\" that comes with 1.5.4, if we do not do anything,\n   can produce a diff that will be rejected by the stricter\n   check \"git apply\" has when used with --no-prefix and friends;\n\n * submodule aware versions of \"git diff\" can be told to add\n   \"--mark-as-git-diff\" when it passes \"--src-prefix=a/git-gui\"\n   and \"--dst-prefix=b/git-gui\" when it recurses internally, to\n   defeat what my proposed patch does.\n\nSo I think it makes more sense to mark output as a non-git diff\nwhen custom prefix is used in the version we are going to ship\nas part of 1.5.4.\n"},{"id":"65601","messageId":"alpine.LNX.1.00.0801161524390.13593@iabervon.org","threadId":"11627","inReplyTo":"7v1w8hploy.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-01-16T20:39:10Z","receivedAt":"2008-01-16T20:39:10Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Wed, 16 Jan 2008, Junio C Hamano wrote:\n\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n> \n> > That's why tying \"--git\" together with any prefix handling is wrong: \n> > because it's a totally different issue. It's true that \"git-apply\" right \n> > now doesn't understand these things, but assuming we want to teach \n> > git-apply to apply to subprojects eventually (we do, don't we?) we'll \n> > eventually have to teach it.\n> \n> That's all correct but\n> \n>  * currently diff does not recurse, nor apply does not apply\n>    recursively;\n> \n>  * \"git diff\" that comes with 1.5.4, if we do not do anything,\n>    can produce a diff that will be rejected by the stricter\n>    check \"git apply\" has when used with --no-prefix and friends;\n> \n>  * submodule aware versions of \"git diff\" can be told to add\n>    \"--mark-as-git-diff\" when it passes \"--src-prefix=a/git-gui\"\n>    and \"--dst-prefix=b/git-gui\" when it recurses internally, to\n>    defeat what my proposed patch does.\n\nOr it could pass an option to include the intermediate portion as part of \nthe name rather than as part of the prefixes. And git-apply would probably \nbe a lot happier to have confirmation that certain files are supposed to \nbe from a submodule, which could be handled by including that option in \nthe header after --git.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"65652","messageId":"7vprw1mfpr.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LNX.1.00.0801161524390.13593@iabervon.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-17T00:57:20Z","receivedAt":"2008-01-17T00:57:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> On Wed, 16 Jan 2008, Junio C Hamano wrote:\n>\n>> Linus Torvalds <torvalds@linux-foundation.org> writes:\n>> \n>> > That's why tying \"--git\" together with any prefix handling is wrong: \n>> > because it's a totally different issue. It's true that \"git-apply\" right \n>> > now doesn't understand these things, but assuming we want to teach \n>> > git-apply to apply to subprojects eventually (we do, don't we?) we'll \n>> > eventually have to teach it.\n>> \n>> That's all correct but\n>> \n>>  * currently diff does not recurse, nor apply does not apply\n>>    recursively;\n>> \n>>  * \"git diff\" that comes with 1.5.4, if we do not do anything,\n>>    can produce a diff that will be rejected by the stricter\n>>    check \"git apply\" has when used with --no-prefix and friends;\n>> \n>>  * submodule aware versions of \"git diff\" can be told to add\n>>    \"--mark-as-git-diff\" when it passes \"--src-prefix=a/git-gui\"\n>>    and \"--dst-prefix=b/git-gui\" when it recurses internally, to\n>>    defeat what my proposed patch does.\n>\n> Or it could pass an option to include the intermediate portion as part of \n> the name rather than as part of the prefixes. And git-apply would probably \n> be a lot happier to have confirmation that certain files are supposed to \n> be from a submodule, which could be handled by including that option in \n> the header after --git.\n\nYeah, I guess we can solve it that way.  In either case that's a\nfuture thing.\n\nAn important point for me in this discussion is to agree that\nthe current --no-prefix that claims to be \"diff --git\" is not\nsafe for release and come to consensus that we need a fix.\n"},{"id":"65657","messageId":"alpine.LSU.1.00.0801170108440.17650@racer.site","threadId":"11627","inReplyTo":"7vprw1mfpr.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-17T01:11:16Z","receivedAt":"2008-01-17T01:11:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 16 Jan 2008, Junio C Hamano wrote:\n\n> An important point for me in this discussion is to agree that the \n> current --no-prefix that claims to be \"diff --git\" is not safe for \n> release and come to consensus that we need a fix.\n\nHaving had time to think about it for a while, I think that the \n--no-prefix still can make sense with --git.  For example, if I want to \nsubmit a gitk patch, but only have git.git (and consequently, made the fix \nin that repository), I could use \"git diff --no-prefix\" to make it easier \nfor Paul, no?\n\nCiao,\nDscho\n"},{"id":"65660","messageId":"7vejchmeom.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LSU.1.00.0801170108440.17650@racer.site","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-17T01:19:37Z","receivedAt":"2008-01-17T01:19:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Having had time to think about it for a while, I think that the \n> --no-prefix still can make sense with --git.  For example, if I want to \n> submit a gitk patch, but only have git.git (and consequently, made the fix \n> in that repository), I could use \"git diff --no-prefix\" to make it easier \n> for Paul, no?\n\nNo, what you are talking about is a need of negative prefix,\nwhich you did not implement in that no/src/dst-prefix patch.\n\nUsing --no-prefix is a _hack_ that may happen to work only when\nthe subtree-merged project is one level down.  You would need\nnegative prefix of two level _and_ a/ and b/ prefix, when gitk\nis moved to modules/gitk subdirectory.\n\nIncidentally I am planning to do such a move of gitk and git-gui\nto one level down (modules/gitk and modules/git-gui) sometime in\nthe future when I convert git.git to use submodules.  Privately\nI already have such a tree based on -rc3 but for obvious reasons\nI cannot push it out even to a preview branch in git.git\nrepository for the time being.\n"},{"id":"65661","messageId":"7vabn5mdz7.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LSU.1.00.0801170108440.17650@racer.site","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-17T01:34:52Z","receivedAt":"2008-01-17T01:34:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Wed, 16 Jan 2008, Junio C Hamano wrote:\n>\n>> An important point for me in this discussion is to agree that the \n>> current --no-prefix that claims to be \"diff --git\" is not safe for \n>> release and come to consensus that we need a fix.\n>\n> Having had time to think about it for a while, I think that...\n\nWhile we are discussing about diff, there is one thing that has\nbeen bugging me occasionally, but the annoyance factor has not\nmotivated me enough to look into it myself, because I do not use\nit often: --color-words.  It appears that it shows lines that do\nnot have any word differences in bold (whatever diff.color.meta\nis configured) and I think it should use plain color instead.\n\nWas this intentional, or just a simple plain bug?\n\nI noticed when I was reviewing documentation patch I received\nfrom Dave Peticolas today (the feature is great for \"apply the\npatch as received, review the --color-words output, and undo the\nuncalled-for line wrapping\" workflow).\n"},{"id":"65665","messageId":"alpine.LSU.1.00.0801170147350.17650@racer.site","threadId":"11627","inReplyTo":"7vabn5mdz7.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-17T01:48:54Z","receivedAt":"2008-01-17T01:48:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 16 Jan 2008, Junio C Hamano wrote:\n\n> While we are discussing about diff, there is one thing that has been \n> bugging me occasionally, but the annoyance factor has not motivated me \n> enough to look into it myself, because I do not use it often: \n> --color-words.  It appears that it shows lines that do not have any word \n> differences in bold (whatever diff.color.meta is configured) and I think \n> it should use plain color instead.\n> \n> Was this intentional, or just a simple plain bug?\n\nPlain bug.  I even meant to implement your suggestion of having a variable \nset of non-word characters, but never came around to work on it.  \nHopefully this weekend...\n\nCiao,\nDscho\n"},{"id":"65666","messageId":"alpine.LSU.1.00.0801170151040.17650@racer.site","threadId":"11627","inReplyTo":"7vejchmeom.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-17T01:54:16Z","receivedAt":"2008-01-17T01:54:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 16 Jan 2008, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > Having had time to think about it for a while, I think that the \n> > --no-prefix still can make sense with --git.  For example, if I want \n> > to submit a gitk patch, but only have git.git (and consequently, made \n> > the fix in that repository), I could use \"git diff --no-prefix\" to \n> > make it easier for Paul, no?\n> \n> No, what you are talking about is a need of negative prefix, which you \n> did not implement in that no/src/dst-prefix patch.\n\nI'm probably missing something, but wouldn't a \"diff --git gitk-git/gitk \ngitk-git/gitk\" instead of \"diff --git a/gitk-git/gitk b/gitk-git/gitk\" in \nmbox format be directly grokkable by git-am?\n\n> Using --no-prefix is a _hack_ that may happen to work only when\n> the subtree-merged project is one level down.\n\nYep.  But my point was more to show that it is still a valid git diff.  \nWith all the niceties that come with it, like \"rename from\", \"rename to\".  \nSo \"--no-prefix\" is not that good a reason to strip the \"--git\" away.\n\nProbably I missed something, though.\n\nCiao,\nDscho\n"},{"id":"65671","messageId":"7vzlv5kwxy.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LSU.1.00.0801170151040.17650@racer.site","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-17T02:28:09Z","receivedAt":"2008-01-17T02:28:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> No, what you are talking about is a need of negative prefix, which you \n>> did not implement in that no/src/dst-prefix patch.\n>\n> I'm probably missing something, but wouldn't a \"diff --git gitk-git/gitk \n> gitk-git/gitk\" instead of \"diff --git a/gitk-git/gitk b/gitk-git/gitk\" in \n> mbox format be directly grokkable by git-am?\n>\n>> Using --no-prefix is a _hack_ that may happen to work only when\n>> the subtree-merged project is one level down.\n>\n> Yep.  But my point was more to show that it is still a valid git diff.  \n\nMy point was that the validness you mentined above is a\nhappenstance, and not a result of a good design.\n\nAfter I move gitk-git one level down to modules/gitk but before\nmaking it as a submodule, the output with --no-prefix will say\n\"diff --git modules/gitk/gitk modules/gitk/gitk\", and that will\nnot be a suitable diff for Paul to apply to his tree.\n\nI think he needs \"-p2\", but then he can already do that to diffs\nproduced without using your --no-prefix that talks about \"diff\n--git a/gitk-git/gitk b/gitk-git/gitk\".  IOW, --no-prefix is not\na solution to anything.\n\nAnd that is why I keep calling your \"--no-prefix happens to work\nif you are only talking about a project that is subtree-merged\none level down\" argument a _hack_.\n\nIf we were to do this properly in \"git diff\", we would:\n\n - introduce a separate --strip-paths=1 (or whatever number of\n   levels of leading prefix);\n\n - not use --{src,dst,no}-prefix\n\nand you would do:\n\n\t$ git diff --strip-paths=1 gitk-git\n\nin the current tree, which would first strip one path component\nand then do the usual opt->a_prefix/b_prefix thing to show:\n\n\tdiff --git a/gitk b/gitk\n\nSimilarly you would run:\n\n        $ git diff --strip-paths=2 modules/gitk\n\nafter I move gitk-git down one level.\n\nAn alternative would be to use the jc/diff-relative topic\ncurrently parked in 'offcuts' branch, and run:\n\n\t$ cd gitk-git && git diff .\n\nor\n\n\t$ cd modules/gitk && git diff .\n\nwhich would give diffs in relative paths.\n"},{"id":"65673","messageId":"7vve5tkwai.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"alpine.LSU.1.00.0801170147350.17650@racer.site","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-17T02:42:13Z","receivedAt":"2008-01-17T02:42:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> While we are discussing about diff, there is one thing that has been \n>> bugging me occasionally, but the annoyance factor has not motivated me \n>> enough to look into it myself, because I do not use it often: \n>> --color-words.  It appears that it shows lines that do not have any word \n>> differences in bold (whatever diff.color.meta is configured) and I think \n>> it should use plain color instead.\n>> \n>> Was this intentional, or just a simple plain bug?\n>\n> Plain bug.  I even meant to implement your suggestion of having a variable \n> set of non-word characters, but never came around to work on it.  \n> Hopefully this weekend...\n\nI am not sure what that variable is about, but in the code you\nhave fn_out_diff_words_aux() that uses OLD/NEW/PLAIN and I do\nnot see where  you try to color anything to METAINFO color.\n\nPerhaps you are talking about a different problem?  I am a bit\nconfused...\n"},{"id":"65674","messageId":"alpine.LSU.1.00.0801170244400.17650@racer.site","threadId":"11627","inReplyTo":"7vve5tkwai.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-17T02:45:05Z","receivedAt":"2008-01-17T02:45:05Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 16 Jan 2008, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> >> While we are discussing about diff, there is one thing that has been \n> >> bugging me occasionally, but the annoyance factor has not motivated \n> >> me enough to look into it myself, because I do not use it often: \n> >> --color-words.  It appears that it shows lines that do not have any \n> >> word differences in bold (whatever diff.color.meta is configured) and \n> >> I think it should use plain color instead.\n> >> \n> >> Was this intentional, or just a simple plain bug?\n> >\n> > Plain bug.  I even meant to implement your suggestion of having a \n> > variable set of non-word characters, but never came around to work on \n> > it.  Hopefully this weekend...\n> \n> I am not sure what that variable is about, but in the code you have \n> fn_out_diff_words_aux() that uses OLD/NEW/PLAIN and I do not see where \n> you try to color anything to METAINFO color.\n> \n> Perhaps you are talking about a different problem?  I am a bit \n> confused...\n\nYes, I was talking about another problem, which I want to look at while \nworking on --color-diff.\n\nCiao,\nDscho\n"},{"id":"65721","messageId":"20080117144914.GA2816@coredump.intra.peff.net","threadId":"11627","inReplyTo":"alpine.LSU.1.00.0801170147350.17650@racer.site","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-01-17T14:49:14Z","receivedAt":"2008-01-17T14:49:14Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 17, 2008 at 01:48:54AM +0000, Johannes Schindelin wrote:\n\n> > While we are discussing about diff, there is one thing that has been \n> > bugging me occasionally, but the annoyance factor has not motivated me \n> > enough to look into it myself, because I do not use it often: \n> > --color-words.  It appears that it shows lines that do not have any word \n> > differences in bold (whatever diff.color.meta is configured) and I think \n> > it should use plain color instead.\n> > \n> > Was this intentional, or just a simple plain bug?\n> \n> Plain bug.  I even meant to implement your suggestion of having a variable \n> set of non-word characters, but never came around to work on it.  \n\nHmm. I happen to set my \"meta\" color to something a little less\nattention-grabbing (magenta), and I find the alternate coloring to be a\nnice visual indicator of \"nothing happened on this line\". I can see how\nbold would be very distracting, though. Perhaps there should be a\ncolor.diff.unimportant?\n\n-Peff\n"},{"id":"65722","messageId":"20080117150306.GB2816@coredump.intra.peff.net","threadId":"11627","inReplyTo":"20080117144914.GA2816@coredump.intra.peff.net","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-01-17T15:03:06Z","receivedAt":"2008-01-17T15:03:06Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 17, 2008 at 09:49:14AM -0500, Jeff King wrote:\n\n> Hmm. I happen to set my \"meta\" color to something a little less\n> attention-grabbing (magenta), and I find the alternate coloring to be a\n> nice visual indicator of \"nothing happened on this line\". I can see how\n> bold would be very distracting, though. Perhaps there should be a\n> color.diff.unimportant?\n\nBTW, here is the fix to at least color it as plain (it is a little\nlarger than the one line it needs to be because it cleans up the\nvariable name \"set\", which is what caused this confusion in the first\nplace).\n\n-- >8 --\ncolor unchanged lines as \"plain\" in \"diff --color-words\"\n\nThese were mistakenly being colored in \"meta\" color.\n\n---\ndiff --git a/diff.c b/diff.c\nindex b18c140..9b02e79 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -552,7 +552,8 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)\n \tint i;\n \tint color;\n \tstruct emit_callback *ecbdata = priv;\n-\tconst char *set = diff_get_color(ecbdata->color_diff, DIFF_METAINFO);\n+\tconst char *meta = diff_get_color(ecbdata->color_diff, DIFF_METAINFO);\n+\tconst char *plain = diff_get_color(ecbdata->color_diff, DIFF_PLAIN);\n \tconst char *reset = diff_get_color(ecbdata->color_diff, DIFF_RESET);\n \n \t*(ecbdata->found_changesp) = 1;\n@@ -564,9 +565,9 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)\n \t\tname_b_tab = strchr(ecbdata->label_path[1], ' ') ? \"\\t\" : \"\";\n \n \t\tprintf(\"%s--- %s%s%s\\n\",\n-\t\t       set, ecbdata->label_path[0], reset, name_a_tab);\n+\t\t       meta, ecbdata->label_path[0], reset, name_a_tab);\n \t\tprintf(\"%s+++ %s%s%s\\n\",\n-\t\t       set, ecbdata->label_path[1], reset, name_b_tab);\n+\t\t       meta, ecbdata->label_path[1], reset, name_b_tab);\n \t\tecbdata->label_path[0] = ecbdata->label_path[1] = NULL;\n \t}\n \n@@ -586,7 +587,6 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)\n \t}\n \n \tif (len < ecbdata->nparents) {\n-\t\tset = reset;\n \t\temit_line(reset, reset, line, len);\n \t\treturn;\n \t}\n@@ -610,7 +610,7 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)\n \t\t\tdiff_words_show(ecbdata->diff_words);\n \t\tline++;\n \t\tlen--;\n-\t\temit_line(set, reset, line, len);\n+\t\temit_line(plain, reset, line, len);\n \t\treturn;\n \t}\n \tfor (i = 0; i < ecbdata->nparents && len; i++) {\n"},{"id":"65724","messageId":"alpine.LSU.1.00.0801171511080.5731@racer.site","threadId":"11627","inReplyTo":"20080117150306.GB2816@coredump.intra.peff.net","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-17T15:12:34Z","receivedAt":"2008-01-17T15:12:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 17 Jan 2008, Jeff King wrote:\n\n> On Thu, Jan 17, 2008 at 09:49:14AM -0500, Jeff King wrote:\n> \n> > Hmm. I happen to set my \"meta\" color to something a little less \n> > attention-grabbing (magenta), and I find the alternate coloring to be \n> > a nice visual indicator of \"nothing happened on this line\". I can see \n> > how bold would be very distracting, though. Perhaps there should be a \n> > color.diff.unimportant?\n> \n> BTW, here is the fix to at least color it as plain (it is a little \n> larger than the one line it needs to be because it cleans up the \n> variable name \"set\", which is what caused this confusion in the first \n> place).\n\nAh, that explains it!  Your patch looks good to me.\n\nThanks,\nDscho\n\nP.S.:\n\n> @@ -586,7 +587,6 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)\n>  \t}\n>  \n>  \tif (len < ecbdata->nparents) {\n> -\t\tset = reset;\n>  \t\temit_line(reset, reset, line, len);\n>  \t\treturn;\n>  \t}\n\nI wonder what I wanted to achieve with that ;-)\n"},{"id":"65726","messageId":"20080117151836.GA6123@coredump.intra.peff.net","threadId":"11627","inReplyTo":"alpine.LSU.1.00.0801171511080.5731@racer.site","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-01-17T15:18:36Z","receivedAt":"2008-01-17T15:18:36Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 17, 2008 at 03:12:34PM +0000, Johannes Schindelin wrote:\n\n> > @@ -586,7 +587,6 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)\n> >  \t}\n> >  \n> >  \tif (len < ecbdata->nparents) {\n> > -\t\tset = reset;\n> >  \t\temit_line(reset, reset, line, len);\n> >  \t\treturn;\n> >  \t}\n> \n> I wonder what I wanted to achieve with that ;-)\n\nHeh. I'm guessing it was supposed to be\n\n  set = reset;\n  emit_line(set, reset, line, len);\n\nand you optimized the first line out. :)\n\n-Peff\n"},{"id":"65833","messageId":"7v63xrilvx.fsf@gitster.siamese.dyndns.org","threadId":"11627","inReplyTo":"7v1w8hploy.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-18T08:22:10Z","receivedAt":"2008-01-18T08:22:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n>\n>> That's why tying \"--git\" together with any prefix handling is wrong: \n>> because it's a totally different issue. It's true that \"git-apply\" right \n>> now doesn't understand these things, but assuming we want to teach \n>> git-apply to apply to subprojects eventually (we do, don't we?) we'll \n>> eventually have to teach it.\n>\n> That's all correct but\n>\n>  * currently diff does not recurse, nor apply does not apply\n>    recursively;\n>\n>  * \"git diff\" that comes with 1.5.4, if we do not do anything,\n>    can produce a diff that will be rejected by the stricter\n>    check \"git apply\" has when used with --no-prefix and friends;\n>\n>  * submodule aware versions of \"git diff\" can be told to add\n>    \"--mark-as-git-diff\" when it passes \"--src-prefix=a/git-gui\"\n>    and \"--dst-prefix=b/git-gui\" when it recurses internally, to\n>    defeat what my proposed patch does.\n>\n> So I think it makes more sense to mark output as a non-git diff\n> when custom prefix is used in the version we are going to ship\n> as part of 1.5.4.\n\nDo you still have objections to the patch?\n\nI do not think it matters _too much_, but I think starting\nstricter and then making things more relaxed later is easier\nthan the other way around.\n"},{"id":"65949","messageId":"20080119093636.GA4281@efreet.light.src","threadId":"11627","inReplyTo":"alpine.LNX.1.00.0801152226000.13593@iabervon.org","subject":"Re: [PATCH v2] Do not show \"diff --git\" metainfo with --no-prefix","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2008-01-19T09:36:36Z","receivedAt":"2008-01-19T09:36:36Z","isPatch":true,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Tue, Jan 15, 2008 at 22:56:14 -0500, Daniel Barkalow wrote:\n> On Tue, 15 Jan 2008, Linus Torvalds wrote:\n> > [...]\n> > So maybe a --standard-diff option that removes the \"--git\" part, but also \n> > removes everything else.\n> \n> That seems wise to me. We should be able to generate patches that are \n> accessible to programs that can't follow any clever instructions. I think \n> the point of the \"Index:\" header is that these programs will freak out if \n> two filenames don't match (or, more likely, break in some way), and it \n> means you can't sensibly generate patches that upset them for deletes or \n> creates.\n\nFunny, Subversion has support for explicit renames in core. So I would have\nthought it can represent them in it's diffs. Might be worth checking what it\ngenerates for copies and deletes (rename being a copy+delete in SVN) before\ncreating the converter from git to subversion diffs.\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"},{"id":"71742","messageId":"320075ff0803111038x36bc40bbkf4b9eec6dd9284fd@mail.gmail.com","threadId":"11627","inReplyTo":"alpine.LNX.1.00.0801152109580.13593@iabervon.org","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Nigel Magnay","fromEmail":"nigel.magnay@gmail.com","sentAt":"2008-03-11T17:38:22Z","receivedAt":"2008-03-11T17:38:22Z","isPatch":false,"sender":{"key":"nigel.magnay@gmail.com","avatar":"https://gravatar.com/avatar/d85cf38287bef3a8e4fa02358d2756d7589f8676c5eeb881ce2f6d731e4526c3?d=mp&s=160"},"body":"Did there ever become a way of generating svn format diffs from git?\n\nA project is having a hard time applying my format-patch --no-prefix\ndiffs, but I don't have a tortoiseSVN machine to figure out why..\n\nOn Wed, Jan 16, 2008 at 2:20 AM, Daniel Barkalow <barkalow@iabervon.org> wrote:\n> On Tue, 15 Jan 2008, Chris Ortman wrote:\n>\n>\n> > You are correct about Tortoise in that it is too strict.\n>  > I looked through their code and they have written their own patch\n>  > program which keys off these Index: lines\n>  > http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseMerge/Patch.cpp\n>  >\n>  > I think it could go either way as to if git-svn creates a different\n>  > format patch or tsvn accepts multiple formats, but I anticipated\n>  > git-svn would be easier to extend so I started here.\n>\n>  I think it would be worthwhile for tsvn to be less picky in some ways. It\n>  should at least be able to accept GNU diff, since sometimes people send\n>  maintainers patches prepared by hand (diff -u file.c.orig file.c), and\n>  there are comments in there that suggest that they're trying to support\n>  non-svn-generated diffs, although they seem to think that such diffs look\n>  like:\n>\n>  Index: filename\n>  ============\n>  @@ -xxx,xxx +xxx,xxx @@\n>  ...\n>\n>  which isn't anything I've ever seen. You're much more likely to get:\n>\n>  ...junk...\n>  --- junk\n>  +++ filename    junk\n>  @@ -xxx,xxx +xxx,xxx @@\n>\n>  And that should be easy enough to parse as an alternative format in tsvn.\n>  (I'd send them a patch to do it, but they wouldn't be able to apply it...)\n>\n>\n>         -Daniel\n>  *This .sig left intentionally blank*\n>  -\n>\n>\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>  the body of a message to majordomo@vger.kernel.org\n>  More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"71751","messageId":"20080311192218.GA7040@efreet.light.src","threadId":"11627","inReplyTo":"320075ff0803111038x36bc40bbkf4b9eec6dd9284fd@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2008-03-11T19:22:18Z","receivedAt":"2008-03-11T19:22:18Z","isPatch":false,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Tue, Mar 11, 2008 at 17:38:22 +0000, Nigel Magnay wrote:\n> Did there ever become a way of generating svn format diffs from git?\n\nThere was a talk about it, but I am not sure anything was actually written.\nWould be quite easy to add the Index: and equals line with a few lines of\nperl.\n\n> A project is having a hard time applying my format-patch --no-prefix\n> diffs, but I don't have a tortoiseSVN machine to figure out why..\n\nYou quoted quite precise explanation below.\n\n> On Wed, Jan 16, 2008 at 2:20 AM, Daniel Barkalow <barkalow@iabervon.org> wrote:\n> > On Tue, 15 Jan 2008, Chris Ortman wrote:\n> >\n> >\n> > > You are correct about Tortoise in that it is too strict.\n> >  > I looked through their code and they have written their own patch\n> >  > program which keys off these Index: lines\n> >  > http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseMerge/Patch.cpp\n> >  >\n> >  > I think it could go either way as to if git-svn creates a different\n> >  > format patch or tsvn accepts multiple formats, but I anticipated\n> >  > git-svn would be easier to extend so I started here.\n> >\n> >  I think it would be worthwhile for tsvn to be less picky in some ways. It\n> >  should at least be able to accept GNU diff, since sometimes people send\n> >  maintainers patches prepared by hand (diff -u file.c.orig file.c), and\n> >  there are comments in there that suggest that they're trying to support\n> >  non-svn-generated diffs, although they seem to think that such diffs look\n> >  like:\n> >\n> >  Index: filename\n> >  ============\n> >  @@ -xxx,xxx +xxx,xxx @@\n> >  ...\n> >\n> >  which isn't anything I've ever seen. You're much more likely to get:\n> >\n> >  ...junk...\n> >  --- junk\n> >  +++ filename    junk\n> >  @@ -xxx,xxx +xxx,xxx @@\n> >\n> >  And that should be easy enough to parse as an alternative format in tsvn.\n> >  (I'd send them a patch to do it, but they wouldn't be able to apply it...)\n> >\n> >\n> >         -Daniel\n> >  *This .sig left intentionally blank*\n> >  -\n> >\n> >\n> > To unsubscribe from this list: send the line \"unsubscribe git\" in\n> >  the body of a message to majordomo@vger.kernel.org\n> >  More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> >\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"},{"id":"71778","messageId":"alpine.LNX.1.00.0803120036280.19665@iabervon.org","threadId":"11627","inReplyTo":"320075ff0803111038x36bc40bbkf4b9eec6dd9284fd@mail.gmail.com","subject":"Re: [FEATURE REQUEST] git-svn format-patch","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-03-12T04:38:19Z","receivedAt":"2008-03-12T04:38:19Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 11 Mar 2008, Nigel Magnay wrote:\n\n> Did there ever become a way of generating svn format diffs from git?\n> \n> A project is having a hard time applying my format-patch --no-prefix\n> diffs, but I don't have a tortoiseSVN machine to figure out why..\n\nNot really, so far as I know. I looked at it a bit, but didn't get too \nfar.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"}]}