Re: Question about git log --merge option

2 messages, 2 authors, 2016-06-16 · open the first message on its own page

Re: Question about git log --merge option

From: Junio C Hamano <hidden>
Date: 2016-06-16 02:18:47

Andrey Hsiao [off-list ref] 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.

Re: Question about git log --merge option

From: Andrey Hsiao <hidden>
Date: 2016-06-16 02:18:47

Thanks Junio, I understand the option's meaning now :)

On Thu, Apr 14, 2016 at 4:37 AM, Junio C Hamano [off-list ref] wrote:
Andrey Hsiao [off-list ref] writes:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help