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

Re: [PATCH] gitweb: Do not show 'patch' link in 'commit' view for merges

From
Jeff King <peff@peff.net>
Date
Oct 1, 2009, 07:55 UTC
Message-ID
<20091001075540.GA13436@coredump.intra.peff.net>
In-Reply-To
<200910010936.24789.jnareb@gmail.com>
On Thu, Oct 01, 2009 at 09:36:23AM +0200, Jakub Narebski wrote:
Show 9 quoted lines
> From the point of view of code, 'patch' view is handled by git_patch()
> subroutine, which in turn calls git_commitdiff(-format => 'patch', -single=> 1);
> git_commitdiff checks if 'patch' view is enabled feature, and then 
> composes and calls the following command (I have skipped --git-dir=...):
> 
>   git format-patch --encoding=utf8 --stdout -1 --root <commit-id>
> 
> And git-format-patch produces no output for merge commit.  Then 
> git_commitdiff dumps output of git-format-patch

Ah, OK, I see the code path you are talking about now. My first thought was "shouldn't it be handling the merge case?" but that really doesn't make any sense. The "patch" view is just about something that can be given to "git am", and it doesn't understand merges anyway. And the "commitdiff" and "html" formats already handle it appropriately.

So I think your patch is the right thing to do. Thanks for the explanation.

-Peff
Previous: Jakub NarebskiNext: Jakub Narebski
Message 4 of 10 in “gitweb: Do not show 'patch' link in 'commit' view for merges”
  1. gitweb: Do not show 'patch' link in 'commit' view for mergesJakub Narebski, Sep 30, 2009
  2. Jeff KingOct 1, 2009
  3. Jakub NarebskiOct 1, 2009
  4. Jeff KingOct 1, 2009
  5. Jakub NarebskiOct 1, 2009
  6. gitweb: Do not show 'patch' link for merge commitsJakub Narebski, Oct 9, 2009
  7. Jakub NarebskiOct 9, 2009
  8. gitweb: Do not show 'patch' link for merge commitsJakub Narebski, Oct 9, 2009
  9. Jeff KingOct 9, 2009
  10. Junio C HamanoOct 10, 2009

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.