git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org
Subject: Re: [WIP/RFH] format-patch: Allow diffs for first-parent history
Date: Wed, 8 Dec 2010 04:52:09 -0600	[thread overview]
Message-ID: <20101208105209.GA4947@burratino> (raw)
In-Reply-To: <f60b93ae61c0e3088112cd6e1185d9c66f623813.1291803440.git.git@drmicha.warpmail.net>

Michael J Gruber wrote:

> The attached patch teaches format-patch not to ignore merges (on
> "--first-parent"), but I failed to track how "diff-tree" sets options
> based on "-m"

With hindsight, here's a search result:

 $ git grep -e argv -- builtin/diff-tree.c
 int cmd_diff_tree(int argc, const char **argv, const char *prefix)
         argc = setup_revisions(argc, argv, opt, &s_r_opt);
                 const char *arg = *++argv;

So it's setup_revisions, in revision.c, which clears revs->ignore_merges
when -m is detected.

Maybe it should clear revs->no_merges while at it?  I can't see any
other meaningful meaning for

	git alias.lg "log --no-merges"
	git lg -m HEAD~2..HEAD

or

	git format-patch -m --first-parent HEAD~2..HEAD

Meanwhile I would also be happy to see --first-parent imply -m, though
that might be more controversial since -p -c --first-parent and
-p --cc --first-parent are also meaningful.

      reply	other threads:[~2010-12-08 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 10:18 [WIP/RFH] format-patch: Allow diffs for first-parent history Michael J Gruber
2010-12-08 10:52 ` Jonathan Nieder [this message]

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=20101208105209.GA4947@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    /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).