* [PATCH RFC GSoC] gitweb: Use -M option while using format-patch @ 2010-05-10 16:08 Pavan Kumar Sunkara 2010-05-10 16:41 ` Jakub Narebski 2010-05-10 18:11 ` Petr Baudis 0 siblings, 2 replies; 4+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-10 16:08 UTC (permalink / raw) To: Petr Baudis, Christian Couder, Git List, Jakub Narebski Add option '-M' to use with format-patch whcih detects renames in the commit. Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> --- gitweb/gitweb.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index c356e95..0184de5 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -6117,7 +6117,7 @@ sub git_commitdiff { } push @commit_spec, '--root', $hash; } - open $fd, "-|", git_cmd(), "format-patch", '--encoding=utf8', + open $fd, "-|", git_cmd(), "format-patch", '-M', '--encoding=utf8', '--stdout', @commit_spec or die_error(500, "Open git-format-patch failed"); } else { -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RFC GSoC] gitweb: Use -M option while using format-patch 2010-05-10 16:08 [PATCH RFC GSoC] gitweb: Use -M option while using format-patch Pavan Kumar Sunkara @ 2010-05-10 16:41 ` Jakub Narebski 2010-05-10 16:56 ` Giuseppe Bilotta 2010-05-10 18:11 ` Petr Baudis 1 sibling, 1 reply; 4+ messages in thread From: Jakub Narebski @ 2010-05-10 16:41 UTC (permalink / raw) To: Pavan Kumar Sunkara, Giuseppe Bilotta Cc: Petr Baudis, Christian Couder, Git List CC-ed Guiseppe Bilotta, author of 'patch' and 'patches' views (you can find this information using "git blame" or "git log --grep"). On Mon, 10 May 2010, Pavan Kumar Sunkara wrote: > Add option '-M' to use with format-patch whcih detects > renames in the commit. Subject: [PATCH RFC GSoC] gitweb: Use @diff_opts while using format-patch Make git-format-patch (used by 'patch' and 'patches' views) use the same rename detection options that git-diff and git-diff-tree (used by 'commitdiff', 'blobdiff', etc.) use. Note that I am not sure if it is really a good change, as it might create patches that (currently) can be applied only with git. > > Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> > --- > > gitweb/gitweb.perl | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl > index c356e95..0184de5 100755 > --- a/gitweb/gitweb.perl > +++ b/gitweb/gitweb.perl > @@ -6117,7 +6117,7 @@ sub git_commitdiff { > } > push @commit_spec, '--root', $hash; > } > - open $fd, "-|", git_cmd(), "format-patch", '--encoding=utf8', > + open $fd, "-|", git_cmd(), "format-patch", '-M', '--encoding=utf8', + open $fd, "-|", git_cmd(), "format-patch", @diff_opts, '--encoding=utf8', or - open $fd, "-|", git_cmd(), "format-patch", '--encoding=utf8', - '--stdout', @commit_spec + open $fd, "-|", git_cmd(), "format-patch", @diff_opts, + '--encoding=utf8', '--stdout', @commit_spec This patsh is both line-wrapped and whitespace-damaged (tabs replaced by spacess) > '--stdout', @commit_spec > or die_error(500, "Open git-format-patch failed"); > } else { > -- -- >8 -- Subject: [PATCH RFC GSoC] gitweb: Use @diff_opts while using format-patch Make git-format-patch (used by 'patch' and 'patches' views) use the same rename detection options that git-diff and git-diff-tree (used by 'commitdiff', 'blobdiff', etc.) use. Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> --- gitweb/gitweb.perl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git i/gitweb/gitweb.perl w/gitweb/gitweb.perl index 225f404..d983ce5 100755 --- i/gitweb/gitweb.perl +++ w/gitweb/gitweb.perl @@ -6295,8 +6295,8 @@ sub git_commitdiff { } push @commit_spec, '--root', $hash; } - open $fd, "-|", git_cmd(), "format-patch", '--encoding=utf8', - '--stdout', @commit_spec + open $fd, "-|", git_cmd(), "format-patch", @diff_opts, + '--encoding=utf8', '--stdout', @commit_spec or die_error(500, "Open git-format-patch failed"); } else { die_error(400, "Unknown commitdiff format"); ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RFC GSoC] gitweb: Use -M option while using format-patch 2010-05-10 16:41 ` Jakub Narebski @ 2010-05-10 16:56 ` Giuseppe Bilotta 0 siblings, 0 replies; 4+ messages in thread From: Giuseppe Bilotta @ 2010-05-10 16:56 UTC (permalink / raw) To: Jakub Narebski Cc: Pavan Kumar Sunkara, Petr Baudis, Christian Couder, Git List On Mon, May 10, 2010 at 6:41 PM, Jakub Narebski <jnareb@gmail.com> wrote: > CC-ed Guiseppe Bilotta, author of 'patch' and 'patches' views > (you can find this information using "git blame" or "git log --grep"). > > On Mon, 10 May 2010, Pavan Kumar Sunkara wrote: > >> Add option '-M' to use with format-patch whcih detects >> renames in the commit. > > Subject: [PATCH RFC GSoC] gitweb: Use @diff_opts while using format-patch > > Make git-format-patch (used by 'patch' and 'patches' views) use the > same rename detection options that git-diff and git-diff-tree (used > by 'commitdiff', 'blobdiff', etc.) use. Excellent idea. > Note that I am not sure if it is really a good change, as it might > create patches that (currently) can be applied only with git. I think we can live with that. If we get strong complains about this, we can always introduce support for extra options to cancel the rename detection. (Also, the upcoming GNU patch release seems to support the git diff format, including copies and renames.) > -- >8 -- > Subject: [PATCH RFC GSoC] gitweb: Use @diff_opts while using format-patch > > Make git-format-patch (used by 'patch' and 'patches' views) use the > same rename detection options that git-diff and git-diff-tree (used > by 'commitdiff', 'blobdiff', etc.) use. > > Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> > Acked-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> > --- > gitweb/gitweb.perl | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git i/gitweb/gitweb.perl w/gitweb/gitweb.perl > index 225f404..d983ce5 100755 > --- i/gitweb/gitweb.perl > +++ w/gitweb/gitweb.perl > @@ -6295,8 +6295,8 @@ sub git_commitdiff { > } > push @commit_spec, '--root', $hash; > } > - open $fd, "-|", git_cmd(), "format-patch", '--encoding=utf8', > - '--stdout', @commit_spec > + open $fd, "-|", git_cmd(), "format-patch", @diff_opts, > + '--encoding=utf8', '--stdout', @commit_spec > or die_error(500, "Open git-format-patch failed"); > } else { > die_error(400, "Unknown commitdiff format"); > -- Giuseppe "Oblomov" Bilotta ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RFC GSoC] gitweb: Use -M option while using format-patch 2010-05-10 16:08 [PATCH RFC GSoC] gitweb: Use -M option while using format-patch Pavan Kumar Sunkara 2010-05-10 16:41 ` Jakub Narebski @ 2010-05-10 18:11 ` Petr Baudis 1 sibling, 0 replies; 4+ messages in thread From: Petr Baudis @ 2010-05-10 18:11 UTC (permalink / raw) To: Pavan Kumar Sunkara; +Cc: Christian Couder, Git List, Jakub Narebski On Mon, May 10, 2010 at 09:38:45PM +0530, Pavan Kumar Sunkara wrote: > Add option '-M' to use with format-patch whcih detects > renames in the commit. > > Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> I think git-specific format is no big issue; even if you are applying the patch with plain patch(1) instead, you might very well prefer to be informed of the rename and take appropriate precautions (like mv'ing before applying to avoid unsolvable rejects). Acked-by: Petr Baudis <pasky@suse.cz> > --- > > gitweb/gitweb.perl | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) But please do something about the whitespace damage in the patches you send, thanks! -- Petr "Pasky" Baudis When I feel like exercising, I just lie down until the feeling goes away. -- xed_over ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-10 18:11 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-10 16:08 [PATCH RFC GSoC] gitweb: Use -M option while using format-patch Pavan Kumar Sunkara 2010-05-10 16:41 ` Jakub Narebski 2010-05-10 16:56 ` Giuseppe Bilotta 2010-05-10 18:11 ` Petr Baudis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).