Re: [PATCH 4/4] cherry-pick: Add `--empty` for more robust redundant commit handling
- From
Brian Lyles <brianmlyles@gmail.com>
- Date
- Jan 21, 2024, 18:28 UTC
- Message-ID
- <CAHPHrSddqTEjtfhgVJ=vmRhbtuwXcGEiE1KFZqR1QhKw-HDtSg@mail.gmail.com>
- In-Reply-To
- <06eb93d7-7113-4583-9860-28a6a6d528a2@app.fastmail.com>
On Sat, Jan 20, 2024 at 2:24 PM Kristoffer Haugsbakk <code@khaugsbakk.name> wrote:
Show 15 quoted lines
> On Fri, Jan 19, 2024, at 06:59, brianmlyles@gmail.com wrote: > > From: Brian Lyles <brianmlyles@gmail.com> > > ---keep-redundant-commits:: > > - If a commit being cherry picked duplicates a commit already in the > > - current history, it will become empty. By default these > > - redundant commits cause `cherry-pick` to stop so the user can > > - examine the commit. This option overrides that behavior and > > - creates an empty commit object. Note that use of this option only > > +--empty=(stop|drop|keep):: > > + How to handle commits being cherry-picked that are redundant with > > + changes already in the current history. > > ++ > > +-- > > Trailing whitespace on this line.
Thank you -- This will be corrected with v2.
Is the sample pre-commit hook the ideal way to prevent this in the future? Or is there some config I could set globally to enforce this across repositories? I was having a little trouble finding a good way to accomplish this globally.
Thanks, Brian Lyles