From: Sergey Organov <sorganov@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified
Date: Thu, 13 Dec 2018 09:35:58 +0300 [thread overview]
Message-ID: <87o99qylv5.fsf@javad.com> (raw)
In-Reply-To: <xmqqo99qf46q.fsf@gitster-ct.c.googlers.com> (Junio C. Hamano's message of "Thu, 13 Dec 2018 13:20:29 +0900")
Junio C Hamano <gitster@pobox.com> writes:
> Sergey Organov <sorganov@gmail.com> writes:
>
>> When cherry-picking multiple commits, it's impossible to have both
>> merge- and non-merge commits on the same command-line. Not specifying
>> '-m 1' results in cherry-pick refusing to handle merge commits, while
>> specifying '-m 1' fails on non-merge commits.
>>
>> This patch allows '-m 1' for non-merge commits. Besides, as mainline is
>> always the only parent for a non-merge commit, it made little sense to
>> disable it in the first place.
>
> In the original context to pick a single commit, it made perfect
> sense to avoid mistakes by blindly passing '-m 1' to non-merge
> commit.
>
> It may be fair to say that we failed to reconsider what to
> do with '-m 1' when we did 7e2bfd3f, but it is utterly an unfair
> history revisionism to say that it made little sense to disable it
> in the first place.
In fact I had zero intention on any revisionism. Now I see I should have
said "makes little sense" in present tense to avoid touching deep
historical issues, sorry!
Something like:
"This patch allows '-m 1' for non-merge commits. As mainline is always
the only parent for a non-merge commit, it makes little sense to disable
it."
sounds OK?
>
> The change to the code itself looks sane, but applying this patch
> alone will break existing tests whose expectations must be updated,
> and this new behaviour must be protected by a new test (or two) so
> that we won't accidentally stop accepting "-m 1" for a single-parent
> commit.
I fixed most of the tests, but
"t3510/4: cherry-pick persists opts correctly"
is an offender for me. It looks like it [ab]uses current "-m 1" behavior
just to stop in the middle of the sequence, and I'm not sure how to fix
it most suitably.
Thanks!
--
Sergey
next prev parent reply other threads:[~2018-12-13 6:36 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 [this message]
2018-12-13 15:35 ` Sergey Organov
2018-12-14 2:36 ` Junio C Hamano
2018-12-14 4:39 ` [PATCH v3 0/4] Allow 'cherry-pick -m 1' for non-merge commits Sergey Organov
2018-12-14 4:53 ` [PATCH v3 4/4] t3506: validate '-m 1 -ff' is now accepted " 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 3/4] t3502: validate '-m 1' argument is now accepted for non-merge commits 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: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 3/4] t3502: validate '-m 1' argument is now accepted for non-merge commits Sergey Organov
2019-01-03 17:22 ` SZEDER Gábor
2019-01-06 14:41 ` Sergey Organov
2018-12-14 4:53 ` [PATCH v2 4/4] t3506: validate '-m 1 -ff' " 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
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o99qylv5.fsf@javad.com \
--to=sorganov@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.