From 6c57bac6b18f6a30e1a8c8272a8dc367f202aa88 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 14 Jun 2022 22:29:10 -0400 Subject: 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. --- src/libgit2/diff.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libgit2/diff.c') 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: -- cgit v1.2.1