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

Re: Question about git log --merge option

From
Andrey Hsiao <andreyhsiao@gmail.com>
Date
Apr 14, 2016, 02:31 UTC
Message-ID
<CAArk4YNKoM9p+FVv+q5Ty4YYoWDcXuF-HjEk96F4Pf-i8QWKDA@mail.gmail.com>
In-Reply-To
<xmqqvb3ljldq.fsf@gitster.mtv.corp.google.com>
Thanks Junio, I understand the option's meaning now :)
On Thu, Apr 14, 2016 at 4:37 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 31 quoted lines
> Andrey Hsiao <andreyhsiao@gmail.com> writes:
>
>> Dear list:
>>
>> Just encountered the --merge option for git log.
>>
>> In the man page, it has the following explanation:
>> - After a failed merge, show refs that touch files having a conflict
>> and don't exist on all heads to merge.
>
>         git log --merge [options] -- $paths
>
> is roughly the same as
>
>         git log [options] HEAD...MERGE_HEAD -- $paths'
>
> where $paths' is $paths limited to those with conflicts.  You can
> further think of that as a rough equivalent of
>
>         git log [options] ^X HEAD MERGE_HEAD -- $paths'
>
> where X is the merge base between the tips of these two branches:
>
>     X---o---o---o---H
>      \
>       o---o---o---M
>
> And the commits among these ('o's, H and M in the picture), the ones
> that change any of the $paths' are shown.  If you further limit the
> output (e.g. with -n<n>, or --since=<time>), you may not see all of
> them, of course.
Previous: Junio C Hamano
Message 3 of 3 in “Question about git log --merge option”
  1. Andrey HsiaoApr 13, 2016
  2. Junio C HamanoApr 13, 2016
  3. Andrey HsiaoApr 14, 2016

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.