Thread (10 messages) flat view 10 messages, 3 authors, 2016-06-15

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

From: Jeff King <hidden>
Date: 2016-06-15 22:47:28

On Thu, Oct 01, 2009 at 09:36:23AM +0200, Jakub Narebski wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help