Add whole-diff hash option to GetPatchID

Backport of !9168 (merged) to 19-1-stable.

Adds the opt-in whole_diff_hash option to GetPatchID, which normalizes the diff in-process the way builtin/patch-id.c:get_one_patchid() does with --verbatim and hashes it once with SHA256 instead of summing one digest per file diff. Nothing changes for existing callers, as the option defaults to off.

Backported so that clients running this version can request the option, rather than having to wait for the next minor release.

Clean cherry-pick of the commit on master, no conflicts. make proto produces no drift on this branch and the internal/gitaly/service/diff package passes.

See !9168 (merged) for the full rationale.

Merge request reports

Loading
Loading