{"thread":{"id":"23767","subject":"[PATCH RFC GSoC] gitweb: Use -M option while using format-patch","startedAt":"2010-05-10T16:08:45Z","lastAt":"2010-05-10T18:11:27Z","messageCount":4,"participants":["Pavan Kumar Sunkara","Jakub Narebski","Giuseppe Bilotta","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"141406","messageId":"4BE82F8D.8060205@gmail.com","threadId":"23767","inReplyTo":null,"subject":"[PATCH RFC GSoC] gitweb: Use -M option while using format-patch","fromName":"Pavan Kumar Sunkara","fromEmail":"pavan.sss1991@gmail.com","sentAt":"2010-05-10T16:08:45Z","receivedAt":"2010-05-10T16:08:45Z","isPatch":true,"sender":{"key":"pavan.sss1991@gmail.com","avatar":"https://avatars.githubusercontent.com/u/174703?v=4"},"body":"Add option '-M' to use with format-patch whcih detects\nrenames in the commit.\n\nSigned-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\n---\n\n  gitweb/gitweb.perl |    2 +-\n  1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex c356e95..0184de5 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -6117,7 +6117,7 @@ sub git_commitdiff {\n                         }\n                         push @commit_spec, '--root', $hash;\n                 }\n-               open $fd, \"-|\", git_cmd(), \"format-patch\", \n'--encoding=utf8',\n+               open $fd, \"-|\", git_cmd(), \"format-patch\", '-M', \n'--encoding=utf8',\n                         '--stdout', @commit_spec\n                         or die_error(500, \"Open git-format-patch failed\");\n         } else {\n-- \n1.7.0.4\n"},{"id":"141408","messageId":"201005101841.40011.jnareb@gmail.com","threadId":"23767","inReplyTo":"4BE82F8D.8060205@gmail.com","subject":"Re: [PATCH RFC GSoC] gitweb: Use -M option while using format-patch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-05-10T16:41:35Z","receivedAt":"2010-05-10T16:41:35Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"CC-ed Guiseppe Bilotta, author of 'patch' and 'patches' views\n(you can find this information using \"git blame\" or \"git log --grep\").\n\nOn Mon, 10 May 2010, Pavan Kumar Sunkara wrote:\n\n> Add option '-M' to use with format-patch whcih detects\n> renames in the commit.\n\n  Subject: [PATCH RFC GSoC] gitweb: Use @diff_opts while using format-patch\n\n  Make git-format-patch (used by 'patch' and 'patches' views) use the\n  same rename detection options that git-diff and git-diff-tree (used\n  by 'commitdiff', 'blobdiff', etc.) use.\n\n\nNote that I am not sure if it is really a good change, as it might\ncreate patches that (currently) can be applied only with git.\n\n> \n> Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\n> ---\n> \n>   gitweb/gitweb.perl |    2 +-\n>   1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index c356e95..0184de5 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -6117,7 +6117,7 @@ sub git_commitdiff {\n>                          }\n>                          push @commit_spec, '--root', $hash;\n>                  }\n> -               open $fd, \"-|\", git_cmd(), \"format-patch\", '--encoding=utf8',\n> +               open $fd, \"-|\", git_cmd(), \"format-patch\", '-M', '--encoding=utf8',\n\n  +               open $fd, \"-|\", git_cmd(), \"format-patch\", @diff_opts, '--encoding=utf8',\n\n\nor\n\n  -               open $fd, \"-|\", git_cmd(), \"format-patch\", '--encoding=utf8',\n  -                        '--stdout', @commit_spec\n  +               open $fd, \"-|\", git_cmd(), \"format-patch\", @diff_opts,\n  +                         '--encoding=utf8', '--stdout', @commit_spec\n\nThis patsh is both line-wrapped and whitespace-damaged (tabs replaced\nby spacess)\n\n>                          '--stdout', @commit_spec\n>                          or die_error(500, \"Open git-format-patch failed\");\n>          } else {\n> -- \n\n-- >8 --\nSubject: [PATCH RFC GSoC] gitweb: Use @diff_opts while using format-patch\n\nMake git-format-patch (used by 'patch' and 'patches' views) use the\nsame rename detection options that git-diff and git-diff-tree (used\nby 'commitdiff', 'blobdiff', etc.) use.\n\nSigned-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\nAcked-by: Jakub Narebski <jnareb@gmail.com>\n---\n gitweb/gitweb.perl |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git i/gitweb/gitweb.perl w/gitweb/gitweb.perl\nindex 225f404..d983ce5 100755\n--- i/gitweb/gitweb.perl\n+++ w/gitweb/gitweb.perl\n@@ -6295,8 +6295,8 @@ sub git_commitdiff {\n \t\t\t}\n \t\t\tpush @commit_spec, '--root', $hash;\n \t\t}\n-\t\topen $fd, \"-|\", git_cmd(), \"format-patch\", '--encoding=utf8',\n-\t\t\t'--stdout', @commit_spec\n+\t\topen $fd, \"-|\", git_cmd(), \"format-patch\", @diff_opts,\n+\t\t\t'--encoding=utf8', '--stdout', @commit_spec\n \t\t\tor die_error(500, \"Open git-format-patch failed\");\n \t} else {\n \t\tdie_error(400, \"Unknown commitdiff format\");\n"},{"id":"141409","messageId":"AANLkTikR7zxbhcAjg2WXv9V-eFOkPMf77uCpmo8csr7n@mail.gmail.com","threadId":"23767","inReplyTo":"201005101841.40011.jnareb@gmail.com","subject":"Re: [PATCH RFC GSoC] gitweb: Use -M option while using format-patch","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2010-05-10T16:56:58Z","receivedAt":"2010-05-10T16:56:58Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Mon, May 10, 2010 at 6:41 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n> CC-ed Guiseppe Bilotta, author of 'patch' and 'patches' views\n> (you can find this information using \"git blame\" or \"git log --grep\").\n>\n> On Mon, 10 May 2010, Pavan Kumar Sunkara wrote:\n>\n>> Add option '-M' to use with format-patch whcih detects\n>> renames in the commit.\n>\n>  Subject: [PATCH RFC GSoC] gitweb: Use @diff_opts while using format-patch\n>\n>  Make git-format-patch (used by 'patch' and 'patches' views) use the\n>  same rename detection options that git-diff and git-diff-tree (used\n>  by 'commitdiff', 'blobdiff', etc.) use.\n\nExcellent idea.\n\n> Note that I am not sure if it is really a good change, as it might\n> create patches that (currently) can be applied only with git.\n\nI think we can live with that. If we get strong complains about this,\nwe can always introduce support for extra options to cancel the rename\ndetection. (Also, the upcoming GNU patch release seems to support the\ngit diff format, including copies and renames.)\n\n> -- >8 --\n> Subject: [PATCH RFC GSoC] gitweb: Use @diff_opts while using format-patch\n>\n> Make git-format-patch (used by 'patch' and 'patches' views) use the\n> same rename detection options that git-diff and git-diff-tree (used\n> by 'commitdiff', 'blobdiff', etc.) use.\n>\n> Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\n> Acked-by: Jakub Narebski <jnareb@gmail.com>\nAcked-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n\n> ---\n>  gitweb/gitweb.perl |    4 ++--\n>  1 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git i/gitweb/gitweb.perl w/gitweb/gitweb.perl\n> index 225f404..d983ce5 100755\n> --- i/gitweb/gitweb.perl\n> +++ w/gitweb/gitweb.perl\n> @@ -6295,8 +6295,8 @@ sub git_commitdiff {\n>                        }\n>                        push @commit_spec, '--root', $hash;\n>                }\n> -               open $fd, \"-|\", git_cmd(), \"format-patch\", '--encoding=utf8',\n> -                       '--stdout', @commit_spec\n> +               open $fd, \"-|\", git_cmd(), \"format-patch\", @diff_opts,\n> +                       '--encoding=utf8', '--stdout', @commit_spec\n>                        or die_error(500, \"Open git-format-patch failed\");\n>        } else {\n>                die_error(400, \"Unknown commitdiff format\");\n>\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"},{"id":"141425","messageId":"20100510181127.GW1951@machine.or.cz","threadId":"23767","inReplyTo":"4BE82F8D.8060205@gmail.com","subject":"Re: [PATCH RFC GSoC] gitweb: Use -M option while using format-patch","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2010-05-10T18:11:27Z","receivedAt":"2010-05-10T18:11:27Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Mon, May 10, 2010 at 09:38:45PM +0530, Pavan Kumar Sunkara wrote:\n> Add option '-M' to use with format-patch whcih detects\n> renames in the commit.\n> \n> Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\n\nI think git-specific format is no big issue; even if you are applying\nthe patch with plain patch(1) instead, you might very well prefer to be\ninformed of the rename and take appropriate precautions (like mv'ing\nbefore applying to avoid unsolvable rejects).\n\nAcked-by: Petr Baudis <pasky@suse.cz>\n\n> ---\n> \n>  gitweb/gitweb.perl |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n\nBut please do something about the whitespace damage in the patches you\nsend, thanks!\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nWhen I feel like exercising, I just lie down until the feeling\ngoes away.  -- xed_over\n"}]}