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

Re: [PATCH] git log -p -m: Document, honor --first-parent

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 10, 2010, 03:23 UTC
Message-ID
<7vk4ullqop.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100210021148.GT9553@machine.or.cz>
Petr Baudis <pasky@suse.cz> writes:
Show 5 quoted lines
> * The branch was created long ago, but has merged latest changes of the
> top of HEAD in, and now the branch is merged back, that's a "bad
> fastforward" since that flips the perspective of main-vs-topic branch.
>
> I feel that it's important to point out this caveat.

Ah, I thought you were contrasting between ff and non-ff, but instead you were giving caveat about trusting "fast-parent", which I didn't realize.

Yeah, but in general, unless it is the final merge to consolidate the work on the topic to mainline that was delegated by the mainline maintainer to the topic person, merging _from_ mainline _to_ topic should rarely happen. And when it happens, relying on the first-parent ancestry obviously breaks down.

> I really dislike the "first-parent ancestry" wording, I think it muds
> down the whole issue.

I am not particularly fond of the wording, either, but any other word you would use, you would need to explain the background information, i.e. how and why the concept embodied by that other word you choose to use relates to the "--first-parent" option.

You can for example say "the changes introduced to the mainline by each commit" (and by "commit" we mean both single parent ones directly made while the mainline was the current branch, and merges made into that branch); you need to define what you mean by "the mainline", and what your assumptions are about the workflow employed (e.g. "rarely if ever merge goes the wrong direction").

Show 8 quoted lines
>> > +		else if (opt->first_parent_only) {
>> > +			/* Generate merge log entry only for the first
>> > +			 * parent, showing summary diff of the others
>> > +			 * we merged _in_. */
>> 
>> Style?
>
> What's wrong?
	/*
         * We prefer to write multi-line comments
         * like this.
         */
Previous: Petr BaudisNext: Christian MICHON
Message 8 of 9 in “What should I do to display the diff of even a simple merge commit?”
  1. Christian MICHONFeb 9, 2010
  2. Christian MICHONFeb 9, 2010
  3. Petr BaudisFeb 9, 2010
  4. Junio C HamanoFeb 10, 2010
  5. git log -p -m: Document, honor --first-parentPetr Baudis, Feb 10, 2010
  6. Junio C HamanoFeb 10, 2010
  7. Petr BaudisFeb 10, 2010
  8. Junio C HamanoFeb 10, 2010
  9. Christian MICHONFeb 10, 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.