Re: [RFC PATCH] cherry-pick: set default `--mainline` parent to 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 20, 2019 at 10:57 AM C.J. Jameson <cjcjameson@xxxxxxxxx> wrote:
> --m parent-number::
> ---mainline parent-number::
> +-m [parent-number]::

Careful with this. Optional argument with a short option means the
"stuck" form which is known to cause confusion [1].

Try "git revert -mX HEAD" and "git revert -m X HEAD". The first one
reports invalid number (good). The second assumes "X" not to be an
argument of "-m" and leave it for the caller (revert in this case) to
handle, which could do unexpected things.

Personally I'm not excited to have more stuck forms like this.

[1] https://public-inbox.org/git/20190208024800.GA11392@xxxxxxxxxxxxxxxxxxxxx/


> +--mainline [parent-number]::
>   Usually you cannot cherry-pick a merge because you do not know which
>   side of the merge should be considered the mainline.  This
>   option specifies the parent number (starting from 1) of
>   the mainline and allows cherry-pick to replay the change
> - relative to the specified parent.
> + relative to the specified parent. The default parent-number is 1.
--
Duy



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux