merge(3p/git): Merge git subtree at v2.29.2
This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb
This commit is contained in:
parent
082c006c04
commit
f4609b896f
1485 changed files with 241535 additions and 109418 deletions
21
third_party/git/hash.h
vendored
21
third_party/git/hash.h
vendored
|
|
@ -16,6 +16,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(SHA256_GCRYPT)
|
||||
#define SHA256_NEEDS_CLONE_HELPER
|
||||
#include "sha256/gcrypt.h"
|
||||
#elif defined(SHA256_OPENSSL)
|
||||
#include <openssl/sha.h>
|
||||
|
|
@ -54,12 +55,28 @@
|
|||
#define git_SHA256_Update platform_SHA256_Update
|
||||
#define git_SHA256_Final platform_SHA256_Final
|
||||
|
||||
#ifdef platform_SHA256_Clone
|
||||
#define git_SHA256_Clone platform_SHA256_Clone
|
||||
#endif
|
||||
|
||||
#ifdef SHA1_MAX_BLOCK_SIZE
|
||||
#include "compat/sha1-chunked.h"
|
||||
#undef git_SHA1_Update
|
||||
#define git_SHA1_Update git_SHA1_Update_Chunked
|
||||
#endif
|
||||
|
||||
static inline void git_SHA1_Clone(git_SHA_CTX *dst, const git_SHA_CTX *src)
|
||||
{
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
}
|
||||
|
||||
#ifndef SHA256_NEEDS_CLONE_HELPER
|
||||
static inline void git_SHA256_Clone(git_SHA256_CTX *dst, const git_SHA256_CTX *src)
|
||||
{
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Note that these constants are suitable for indexing the hash_algos array and
|
||||
* comparing against each other, but are otherwise arbitrary, so they should not
|
||||
|
|
@ -85,6 +102,7 @@ union git_hash_ctx {
|
|||
typedef union git_hash_ctx git_hash_ctx;
|
||||
|
||||
typedef void (*git_hash_init_fn)(git_hash_ctx *ctx);
|
||||
typedef void (*git_hash_clone_fn)(git_hash_ctx *dst, const git_hash_ctx *src);
|
||||
typedef void (*git_hash_update_fn)(git_hash_ctx *ctx, const void *in, size_t len);
|
||||
typedef void (*git_hash_final_fn)(unsigned char *hash, git_hash_ctx *ctx);
|
||||
|
||||
|
|
@ -110,6 +128,9 @@ struct git_hash_algo {
|
|||
/* The hash initialization function. */
|
||||
git_hash_init_fn init_fn;
|
||||
|
||||
/* The hash context cloning function. */
|
||||
git_hash_clone_fn clone_fn;
|
||||
|
||||
/* The hash update function. */
|
||||
git_hash_update_fn update_fn;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue