In a deployment pipeline I'm checking out master in a clean clone (which is the target) and then I merge the revision into it to update it.
git checkout master
git merge "${revision}"
As git has a pre-merge check it then tells in my scenario:
Already up-to-date.
when the revision was already merged.
How can I find out previous to the merge command, that this ("Already up-to-date") is the case, so that I can exit the pipeline early as there is nothing anymore to do?