All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Elijah Newren <newren@gmail.com>,
	"C.J. Jameson" <cjcjameson@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [RFC PATCH] cherry-pick: set default `--mainline` parent to 1
Date: Thu, 21 Mar 2019 08:40:53 +0300	[thread overview]
Message-ID: <87pnqklr8a.fsf@javad.com> (raw)
In-Reply-To: <xmqq4l7wuddk.fsf@gitster-ct.c.googlers.com> (Junio C. Hamano's message of "Thu, 21 Mar 2019 12:15:19 +0900")

Junio C Hamano <gitster@pobox.com> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> Elijah Newren <newren@gmail.com> writes:
>>
>>> This worries me that it'll lead to bad surprises.  Perhaps some folks
>>> cherry-pick merges around intentionally, but I would want that to be a
>>> rare occurrence at most.
>>
>> We can just reject this RFC patch and we'd be in a slightly safer
>> place.  You still need to tell us with "-m 1" on the command line
>> that you are picking a range with merges in it.  But then I am sure
>> that clueless people blindly would alias "pick = cherry-pick -m1" and
>> use "git pick" and blindly pick ranges here and there, so I am not
>> sure such a slightly-more safety buys us very much.
>
> To put it a bit differently, I share with you that picking merges
> should be deliberate and it is safer to make sure allowing it only
> when the told us that s/he knows the commit being picked is a merge,

Something like "--[no-]ban-merges" then [*], having "--ban-merges" as
default?

> but when we started allowing "-m 1" for non-merge commits in the
> current world where cherry-pick can work on a range, the ship has
> already sailed.

Except that it could be a different ship, provided we've got
"--ban-merges". Having "-m 1" as default stops to be an issue, and
explicit "-m 1" could then imply --no-ban-merges, that could be in turn
overwritten by explicit "--ban-merges", if necessary.

[*] "--[no]-merges" won't do, as one would expect merges to be silently
dropped from a range of cherry-picks, similar to what "git log" or "git
rev-list" does. BTW, is it a good idea for cherry-pick to start to use
"git rev-list" and support all the options available there?

-- Sergey

  reply	other threads:[~2019-03-21  5:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20  3:54 [RFC PATCH] cherry-pick: set default `--mainline` parent to 1 C.J. Jameson
2019-03-20  4:45 ` Junio C Hamano
2019-03-20 12:01   ` Sergey Organov
2019-03-20 14:39     ` Elijah Newren
2019-03-20 15:59       ` Sergey Organov
2019-03-21  1:51         ` C.J. Jameson
2019-03-21  2:17       ` Junio C Hamano
2019-03-21  3:15         ` Junio C Hamano
2019-03-21  5:40           ` Sergey Organov [this message]
2019-03-21  5:47             ` Junio C Hamano
2019-03-21  6:12               ` Sergey Organov
2019-03-21  8:31                 ` Junio C Hamano
2019-03-21  8:31                 ` Junio C Hamano
2019-03-21 11:59                   ` Sergey Organov
2019-03-22  2:24                     ` Junio C Hamano
2019-03-22 15:22                       ` Sergey Organov
2019-03-22 18:27                         ` C.J. Jameson
2019-03-25 14:55                           ` Johannes Schindelin
2019-03-25 15:41                             ` C.J. Jameson
2019-03-21  6:54               ` Sergey Organov
2019-03-22 10:23         ` Johannes Schindelin
2019-03-22 10:13       ` Johannes Schindelin
2019-03-20  9:44 ` Duy Nguyen

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

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

  git send-email \
    --in-reply-to=87pnqklr8a.fsf@javad.com \
    --to=sorganov@gmail.com \
    --cc=cjcjameson@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.