git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: Do not show 'patch' link in 'commit' view for merges
Date: Thu, 1 Oct 2009 11:18:01 +0200	[thread overview]
Message-ID: <200910011118.02875.jnareb@gmail.com> (raw)
In-Reply-To: <20091001075540.GA13436@coredump.intra.peff.net>

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

  reply	other threads:[~2009-10-01  9:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 20:21 [PATCH] gitweb: Do not show 'patch' link in 'commit' view for merges Jakub Narebski
2009-10-01  3:11 ` Jeff King
2009-10-01  7:36   ` Jakub Narebski
2009-10-01  7:55     ` Jeff King
2009-10-01  9:18       ` Jakub Narebski [this message]
2009-10-09 12:10         ` [PATCH v2] gitweb: Do not show 'patch' link for merge commits Jakub Narebski
2009-10-09 12:23           ` Jakub Narebski
2009-10-09 12:26             ` [PATCH v2 (amend)] " Jakub Narebski
2009-10-09 19:19               ` Jeff King
2009-10-10  0:56               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200910011118.02875.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).