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.
@param out_ Pointer where the calculated patch ID should be stored
@param diff The diff to calculate the ID for
@param opts Options for how to calculate the patch ID. This is
intended for future changes, as currently no options are
available.
@return 0 on success, an error code otherwise.
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.
@param out_ Pointer where the calculated patch ID should be stored @param diff The diff to calculate the ID for @param opts Options for how to calculate the patch ID. This is intended for future changes, as currently no options are available. @return 0 on success, an error code otherwise.