git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>,
	Ramkumar Ramachandra <artagnon@gmail.com>,
	Christian Couder <chriscool@tuxfamily.org>,
	Thomas Rast <trast@inf.ethz.ch>
Subject: Re: [PATCH v2 3/8] cherry-pick: add --skip-empty option
Date: Tue, 4 Jun 2013 12:10:00 -0500	[thread overview]
Message-ID: <CAMP44s2DvtiT6hi-RoPt_bVdGr01S367usz=089E1Ht+Bvh-tA@mail.gmail.com> (raw)
In-Reply-To: <7vehcidg1i.fsf@alter.siamese.dyndns.org>

On Mon, Jun 3, 2013 at 4:45 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> On Mon, Jun 3, 2013 at 1:40 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>>
>>>> Pretty much what it says on the tin.
>>>>
>>>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>>>> ---
>>>>  Documentation/git-cherry-pick.txt   |  3 +++
>>>>  builtin/revert.c                    |  2 ++
>>>>  sequencer.c                         |  6 ++++++
>>>>  sequencer.h                         |  1 +
>>>>  t/t3508-cherry-pick-many-commits.sh | 13 +++++++++++++
>>>>  5 files changed, 25 insertions(+)
>>>>
>>>> diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
>>>> index c205d23..fccd936 100644
>>>> --- a/Documentation/git-cherry-pick.txt
>>>> +++ b/Documentation/git-cherry-pick.txt
>>>> @@ -129,6 +129,9 @@ effect to your index in a row.
>>>>       redundant commits are ignored.  This option overrides that behavior and
>>>>       creates an empty commit object.  Implies `--allow-empty`.
>>>>
>>>> +--skip-empty::
>>>> +     Instead of failing, skip commits that are or become empty.
>>>
>>> Not quite sure.  Is this "instead of recording an empty commit,"
>>> (which may or may not fail depending on the allow-empty settings)?
>>
>> We are explaining --skip-empty, not --allow-empty.
>
> Exactly.  That is why I found the "Instead of failing" questionable.
> It is very easy to read the above as "commits that are or become
> empty usually causes the command to fail, and this is a way to cause
> it not to fail.".
>
> It is true that
>
>     cherry-pick A
>
> when A becomes empty, dies.  But
>
>     cherry-pick --allow-empty A
>
> when A becomes empty, does not fail, but still does create an empty
> commit.  A large difference with --skip-empty, which applies to use
> scenario different from --allow-empty was meant to address, is that
>
>     cherry-pick --skip-empty A
>
> when A becomes empty, does not fail and does not create an empty
> commit, either.

We are not explaining --allow-empty.

What happens when you do --skip-empty --allow-empty? Somebody
suggested a new option, so we could do --foo-empty=skip,allow to
clarify that.

> I think just "Skip commits that are or become empty" without saying
> "Instead of failing," is fine, too.

I think "Instead of failing" makes perfect sense, because it's not our
job to describe what other options do, simply explain what this option
do. If the user is interested in other options, he can read them in
the help for those.

-- 
Felipe Contreras

  reply	other threads:[~2013-06-04 17:10 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29  3:56 [PATCH v2 0/8] cherry-pick: improvements Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 1/8] sequencer: remove useless indentation Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 2/8] sequencer: trivial fix Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 3/8] cherry-pick: add --skip-empty option Felipe Contreras
2013-06-03 18:40   ` Junio C Hamano
2013-06-03 19:21     ` Junio C Hamano
2013-06-03 21:10     ` Felipe Contreras
2013-06-03 21:45       ` Junio C Hamano
2013-06-04 17:10         ` Felipe Contreras [this message]
2013-06-04 17:35           ` Junio C Hamano
2013-06-04 17:40             ` Felipe Contreras
2013-06-04 18:30               ` Junio C Hamano
2013-06-05 14:52                 ` Felipe Contreras
2013-06-05 18:13                   ` Junio C Hamano
2013-06-06  5:01                     ` Felipe Contreras
2013-06-04  6:31       ` Antoine Pelisse
2013-05-29  3:56 ` [PATCH v2 4/8] cherry-pick: store rewritten commits Felipe Contreras
2013-06-03 18:49   ` Junio C Hamano
2013-06-03 20:55     ` Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 5/8] sequencer: run post-rewrite hook Felipe Contreras
2013-06-03 18:57   ` Junio C Hamano
2013-06-03 21:01     ` Felipe Contreras
2013-06-04  9:03     ` Thomas Rast
2013-05-29  3:56 ` [PATCH v2 6/8] cherry-pick: add support to copy notes Felipe Contreras
2013-05-29  3:56 ` [PATCH v2 7/8] revert/cherry-pick: add --quiet option Felipe Contreras
2013-05-29 12:33   ` Ramkumar Ramachandra
2013-05-29 13:28     ` Felipe Contreras
2013-05-29 13:32       ` Ramkumar Ramachandra
2013-05-29 13:40         ` Felipe Contreras
2013-06-03 18:59   ` Junio C Hamano
2013-05-29  3:56 ` [PATCH v2 8/8] revert/cherry-pick: add --skip option Felipe Contreras
2013-05-29 12:27   ` Ramkumar Ramachandra
2013-05-29 13:27     ` Felipe Contreras

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='CAMP44s2DvtiT6hi-RoPt_bVdGr01S367usz=089E1Ht+Bvh-tA@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=trast@inf.ethz.ch \
    /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).