From: Duy Nguyen Date: Wed, 20 Mar 2019 09:44:05 GMT Subject: Re: [RFC PATCH] cherry-pick: set default `--mainline` parent to 1 Message-ID: In-Reply-To: On Wed, Mar 20, 2019 at 10:57 AM C.J. Jameson 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@sigill.intra.peff.net/ > +--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