Calculate the patch ID for the given patch.
Calculate a stable patch ID for the given patch by summing the hash of the file diffs, ignoring whitespace and line numbers. This can be used to derive whether two diffs are the same with a high probability.
Currently, this function only calculates stable patch IDs, as defined in git-patch-id(1), and should in fact generate the same IDs as the upstream git project does.
Options for how to calculate the patch ID. This is intended for future changes, as currently no options are available.
0 on success, an error code otherwise.