diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2022-06-14 22:29:10 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-06-20 17:12:49 -0400 |
| commit | 6c57bac6b18f6a30e1a8c8272a8dc367f202aa88 (patch) | |
| tree | 776f5f9023d3b0076229d1750ff6cedbcd54ef7a /src/libgit2/diff.c | |
| parent | d103620158bb5aca73bc0dad8a230ceda417ab47 (diff) | |
| download | libgit2-6c57bac6b18f6a30e1a8c8272a8dc367f202aa88.tar.gz | |
sha256: make sha256 an experimental optional feature
libgit2 can be built with optional, experimental sha256 support. This
allows consumers to begin testing and providing feedback for our sha256
support while we continue to develop it, and allows us to make API
breaking changes while we iterate on a final sha256 implementation.
The results will be `git2-experimental.dll` and installed as
`git2-experimental.h` to avoid confusion with a production libgit2.
Diffstat (limited to 'src/libgit2/diff.c')
| -rw-r--r-- | src/libgit2/diff.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libgit2/diff.c b/src/libgit2/diff.c index 91931e75b..20a18c4b9 100644 --- a/src/libgit2/diff.c +++ b/src/libgit2/diff.c @@ -381,7 +381,10 @@ int git_diff_patchid(git_oid *out, git_diff *diff, git_diff_patchid_options *opt if ((error = (flush_hunk(&args.result, &args.ctx))) < 0) goto out; +#ifdef GIT_EXPERIMENTAL_SHA256 args.result.type = GIT_OID_SHA1; +#endif + git_oid_cpy(out, &args.result); out: |
