git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sergey Organov <sorganov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified
Date: Wed, 20 Mar 2019 09:38:57 +0900	[thread overview]
Message-ID: <xmqqbm26xtum.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <8736nj2jcl.fsf@javad.com> (Sergey Organov's message of "Tue, 19 Mar 2019 14:29:14 +0300")

Sergey Organov <sorganov@gmail.com> writes:

> I think that "first-parent is special" is the way to go indeed for
> porcelain, as it does make many thing easier and more convenient[*].

Perhaps.  However ...

> [*] One example that immediately comes to mind is "git log -p" for a
> merge commit. I doesn't currently (as of v2.10) show the first-parent
> diff, for whatever reason. "git log -p -m --first-parent" is needed to
> get the answer to most "obvious" question: what (merge) commit did to my
> mainline? "git show" has its own issues.

... this is very much deliberate and will remain so.

A single ball of wax "diff M^ M" for a merge commit is not always
what you would want, especially while viewing "git log -p" (without
"--first-parent").  The reason why the user does not explicitly say
"--first-parent" is because the user wants to even see the details
of individual steps of what happened on side branches.

Incidentally, in such an "I am interested in what happened in each
individual step" mode, the primary change that a merge by itself
does is better shown with "diff --cc M^ M", not "diff -p M^ M".
That is why "show" defaults to "--cc".

"git log -p --first-parent" that requires "-m" to show the single
ball of wax diff for a merge is a separate matter.  When the user
explicitly says "log --first-parent", it is a clear indication that
the user does not want to see individual steps of how side branches
built what each merge brings into the mainline.  From that point of
view, ever sice I introduced "--first-parent" traversal, I've been
wondering what the true downside would be if we turned "-m" on
automatically when these two options are used without "-m".

But it has not disturbed me deeply enough to bother looking into it
further.

  reply	other threads:[~2019-03-20  0:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 12:42 [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified Sergey Organov
2018-06-21 15:54 ` Junio C Hamano
2018-06-22  9:16   ` Sergey Organov
2018-12-12  5:35   ` Sergey Organov
2018-12-13  4:20     ` Junio C Hamano
2018-12-13  6:35       ` Sergey Organov
2018-12-13 15:35         ` Sergey Organov
2018-12-14  2:36           ` Junio C Hamano
2018-12-14  4:39             ` [PATCH v2 0/4] Allow 'cherry-pick -m 1' for non-merge commits Sergey Organov
2018-12-14  4:53               ` [PATCH v2 1/4] t3510: stop using '-m 1' to force failure mid-sequence of cherry-picks Sergey Organov
2018-12-14  4:53               ` [PATCH v2 2/4] cherry-pick: do not error on non-merge commits when '-m 1' is specified Sergey Organov
2018-12-14  4:53               ` [PATCH v2 4/4] t3506: validate '-m 1 -ff' is now accepted for non-merge commits Sergey Organov
2018-12-14  4:53               ` [PATCH v2 3/4] t3502: validate '-m 1' argument " Sergey Organov
2019-01-03 17:22                 ` SZEDER Gábor
2019-01-06 14:41                   ` Sergey Organov
2018-12-25 12:39               ` [PATCH v2 0/4] Allow 'cherry-pick -m 1' " Sergey Organov, Sergey Organov
2018-12-26 22:52                 ` Junio C Hamano
2018-12-29  9:10                   ` Sergey Organov
2018-12-14  4:39             ` [PATCH v3 " Sergey Organov
2018-12-14  4:53               ` [PATCH v3 2/4] cherry-pick: do not error on non-merge commits when '-m 1' is specified Sergey Organov
2018-12-14  4:53               ` [PATCH v3 1/4] t3510: stop using '-m 1' to force failure mid-sequence of cherry-picks Sergey Organov
2018-12-14  4:53               ` [PATCH v3 4/4] t3506: validate '-m 1 -ff' is now accepted for non-merge commits Sergey Organov
2018-12-14  4:53               ` [PATCH v3 3/4] t3502: validate '-m 1' argument " Sergey Organov
2019-03-19 11:29   ` [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified Sergey Organov
2019-03-20  0:38     ` Junio C Hamano [this message]
2019-03-20  5:09       ` Jeff King
2019-03-25  6:43       ` Sergey Organov
2019-03-26 16:32         ` Jeff King
2019-03-26 22:07           ` Elijah Newren
2019-03-26 22:20             ` Jeff King
2019-03-27  0:33               ` Elijah Newren
2019-03-27 13:54           ` Sergey Organov
  -- strict thread matches above, loose matches on Subject: below --
2018-05-25 12:42 Sergey Organov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbm26xtum.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sorganov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).