I\'d like a recipe for finding duplicated changes. patch-id is likely to be the same but the commit attributes may not be.
This seems to be an intended use of patch-
For anyone wanting to do this on windows powershell the equivalent command to unagi's answer is:
git rev-list --no-merges --all | %{&git.exe show $_} |
git patch-id | ConvertFrom-String -PropertyNames PatchId, Commit |
Group-Object PatchId | Where-Object count -gt 1 |
%{$_.group.Commit + " "}
Gives an output like:
1605e0e1e13d7b3f456c20432d8edec664ca7117
1e8efa8f2f01962a2c08fd25caf687d330383428
b45b6db084b27ae420ac8e9cf6511110ebb46513
4a2e1e3ba5a9a1d5db1d00343813e1404f6124e2
With the duplicate commit hashes grouped together.
CAUTION: On my repo this was a slow command so be sure to filter the call to rev-list appropriately!