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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dnia czwartek 1. października 2009 09:55, Jeff King napisał:
> 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.

I'll enhance commit message to talk about issues touched here (that
'patch' is for git-am and doesn't make sense for merges, regardless
of possible bug in 'patch' view when used for merge commits), and
check if this correction isn't needed also elsewhere.

I'll send v2 of this patch in a bit.

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]