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

Re: [WIP/RFH] format-patch: Allow diffs for first-parent history

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 8, 2010, 10:52 UTC
Message-ID
<20101208105209.GA4947@burratino>
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.

Previous: Michael J Gruber
Message 2 of 2 in “[WIP/RFH] format-patch: Allow diffs for first-parent history”
  1. Michael J GruberDec 8, 2010
  2. Jonathan NiederDec 8, 2010

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.