I have a situation where I'd like git cherry-pick
to not "quietly return 0 when some of the source commit's diffs are already present in the destination". Yes, it fails if the resulting commit is empty, but I don't see the option to fail if the resulting commit is not-empty-but-not-the-same-diff-as-the-original. I do not see an option to cherry-pick
to do this, and a quick look at git merge
which I assume provides the underlying functionality for it, also doesn't seem to provide this, though I'm less sure. Is this possible?
Extra notes: yes, I can perform a diff between git show <sourcecommit>
and git show <destcommit>
. I do do that, in fact. But this can give a false failure if the cherry-pick picked up a change in a renamed file. I'd alternately be interested in a solution to this problem.