Skip to content
Snippets Groups Projects
Commit 972fd9a8b2cc authored by Georges Racinet's avatar Georges Racinet
Browse files

DiffService.GetPatchId: initial implementation

Since `git patch-id` does not involve the repository at all (it
ingests a patch and outputs a hash), we are actually spawning it,
with a Mercurial generated patch.

For general consistency (and hoping it does not matter so much),
we are computing the index lines as for the `RawDiff` method, but
Git seems to actually ignore it.

We are avoiding to extract the full content of binary files, as it
would be expensive and essentially useless. This is also what Gitaly
does, and we probably should generalize it to some other `DiffService`
methods (to be checked)

As the Comparison Tests display, the patch id computed by HGitaly
turns out to be identical to the done by Gitaly for simple text-only
diffs. That will obviously not be true of binary diffs.
parent 75d6aa325522
No related branches found
No related tags found
2 merge requests!232Merged stable branch into default,!228DiffService.GetPatchID and install/config doc
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment