From: brianmlyles@gmail.com Date: Fri, 19 Jan 2024 05:59:20 GMT Subject: [PATCH 4/4] cherry-pick: Add `--empty` for more robust redundant commit handling Message-ID: <20240119060721.3734775-5-brianmlyles@gmail.com> In-Reply-To: <20240119060721.3734775-2-brianmlyles@gmail.com> From: Brian Lyles As with `git-rebase` and `git-am`, `git-cherry-pick` can result in a commit being made redundant if the content from the picked commit is already present in the target history. However, `git-cherry-pick` does not have the same options available that `git-rebase` and `git-am` have. There are three things that can be done with these redundant commits: drop them, keep them, or have the cherry-pick stop and wait for the user to take an action. `git-rebase` has the `--empty` option added in commit e98c4269c8 (rebase (interactive-backend): fix handling of commits that become empty, 2020-02-15), which handles all three of these scenarios. Similarly, `git-am` got its own `--empty` in 7c096b8d61 (am: support --empty=