From: Brian Lyles Date: Mon, 25 Mar 2024 23:16:54 +0000 (-0500) Subject: cherry-pick: add `--empty` for more robust redundant commit handling X-Git-Tag: v2.45.0-rc0~50^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec79d763de617905bd9275de0b5941a160d6159b;p=thirdparty%2Fgit.git cherry-pick: add `--empty` for more robust redundant commit handling As with git-rebase(1) and git-am(1), git-cherry-pick(1) 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(1) does not have the same options available that git-rebase(1) and git-am(1) 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(1) 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(1) got its own `--empty` in 7c096b8d61 (am: support --empty=