{"thread":{"id":"42019","subject":"Question about git log --merge option","startedAt":"2016-04-13T16:53:26Z","lastAt":"2016-04-14T02:31:31Z","messageCount":3,"participants":["Andrey Hsiao","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"283382","messageId":"CAArk4YMOkd3dEn-09-LMO7zf=X3iJqXUjCS0YNN5v4h=PjrTLg@mail.gmail.com","threadId":"42019","inReplyTo":null,"subject":"Question about git log --merge option","fromName":"Andrey Hsiao","fromEmail":"andreyhsiao@gmail.com","sentAt":"2016-04-13T16:53:26Z","receivedAt":"2016-04-13T16:53:26Z","isPatch":false,"sender":{"key":"andreyhsiao@gmail.com","avatar":"https://gravatar.com/avatar/123505aa530165f2bcbc033f7797a411e8a6f7c1322f91020233402de8421971?d=mp&s=160"},"body":"Dear list:\n\nJust encountered the --merge option for git log.\n\nIn the man page, it has the following explanation:\n- After a failed merge, show refs that touch files having a conflict\nand don't exist on all heads to merge.\n\nI tried this option and get below results:\n\n1. For a failed merge (with conflicts), if the conflicted file does\nnot exist on either side of the merge, the --merge option will return\nthe log from the other side.\n\n2. If the conflicted file exists on both sides of the merge, the\n--merge option will return the latest change on either side. (i.e: git\nlog -1 -- conflict_file / git log -1 --merge -- conflict_file may\nreturn different results, whichever changed the latest)\n\nI'm not sure whether above behavior is the unexpected result (cannot\nfind detailed explanation for --merge option online).\n\nThanks\n"},{"id":"283406","messageId":"xmqqvb3ljldq.fsf@gitster.mtv.corp.google.com","threadId":"42019","inReplyTo":"CAArk4YMOkd3dEn-09-LMO7zf=X3iJqXUjCS0YNN5v4h=PjrTLg@mail.gmail.com","subject":"Re: Question about git log --merge option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-13T20:37:21Z","receivedAt":"2016-04-13T20:37:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrey Hsiao <andreyhsiao@gmail.com> writes:\n\n> Dear list:\n>\n> Just encountered the --merge option for git log.\n>\n> In the man page, it has the following explanation:\n> - After a failed merge, show refs that touch files having a conflict\n> and don't exist on all heads to merge.\n\n\tgit log --merge [options] -- $paths\n\nis roughly the same as\n\n\tgit log [options] HEAD...MERGE_HEAD -- $paths'\n\nwhere $paths' is $paths limited to those with conflicts.  You can\nfurther think of that as a rough equivalent of\n\n\tgit log [options] ^X HEAD MERGE_HEAD -- $paths'\n\nwhere X is the merge base between the tips of these two branches:\n\n    X---o---o---o---H\n     \\\n      o---o---o---M\n\nAnd the commits among these ('o's, H and M in the picture), the ones\nthat change any of the $paths' are shown.  If you further limit the\noutput (e.g. with -n<n>, or --since=<time>), you may not see all of\nthem, of course.\n"},{"id":"283435","messageId":"CAArk4YNKoM9p+FVv+q5Ty4YYoWDcXuF-HjEk96F4Pf-i8QWKDA@mail.gmail.com","threadId":"42019","inReplyTo":"xmqqvb3ljldq.fsf@gitster.mtv.corp.google.com","subject":"Re: Question about git log --merge option","fromName":"Andrey Hsiao","fromEmail":"andreyhsiao@gmail.com","sentAt":"2016-04-14T02:31:31Z","receivedAt":"2016-04-14T02:31:31Z","isPatch":false,"sender":{"key":"andreyhsiao@gmail.com","avatar":"https://gravatar.com/avatar/123505aa530165f2bcbc033f7797a411e8a6f7c1322f91020233402de8421971?d=mp&s=160"},"body":"Thanks Junio, I understand the option's meaning now :)\n\nOn Thu, Apr 14, 2016 at 4:37 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Andrey Hsiao <andreyhsiao@gmail.com> writes:\n>\n>> Dear list:\n>>\n>> Just encountered the --merge option for git log.\n>>\n>> In the man page, it has the following explanation:\n>> - After a failed merge, show refs that touch files having a conflict\n>> and don't exist on all heads to merge.\n>\n>         git log --merge [options] -- $paths\n>\n> is roughly the same as\n>\n>         git log [options] HEAD...MERGE_HEAD -- $paths'\n>\n> where $paths' is $paths limited to those with conflicts.  You can\n> further think of that as a rough equivalent of\n>\n>         git log [options] ^X HEAD MERGE_HEAD -- $paths'\n>\n> where X is the merge base between the tips of these two branches:\n>\n>     X---o---o---o---H\n>      \\\n>       o---o---o---M\n>\n> And the commits among these ('o's, H and M in the picture), the ones\n> that change any of the $paths' are shown.  If you further limit the\n> output (e.g. with -n<n>, or --since=<time>), you may not see all of\n> them, of course.\n"}]}