Ignore-on-identical-fail-on-different duplicates strategy

I’d like to have a duplicates strategy that ignores the duplicate file if it is identical content-wise and fails if it is different. Maybe this could be solved somehow a bit more generic, so that you can specify a strategy for identical files and a strategy for differing files.