git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH RFC GSoC] gitweb: Use -M option while using format-patch

From
Jakub Narebski <jnareb@gmail.com>
Date
May 10, 2010, 16:41 UTC
Message-ID
<201005101841.40011.jnareb@gmail.com>
In-Reply-To
<4BE82F8D.8060205@gmail.com>

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.

Show 17 quoted lines
> 
> 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");
Previous: Pavan Kumar SunkaraNext: Giuseppe Bilotta
Message 2 of 4 in “gitweb: Use -M option while using format-patch”
  1. gitweb: Use -M option while using format-patchPavan Kumar Sunkara, May 10, 2010
  2. Jakub NarebskiMay 10, 2010
  3. Giuseppe BilottaMay 10, 2010
  4. Petr BaudisMay 10, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.