From: Junio C Hamano Date: Thu, 12 Mar 2026 17:56:02 +0000 (-0700) Subject: Merge branch 'bc/sha1-256-interop-02' X-Git-Tag: v2.54.0-rc0~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8194f1795bf0ca36f245adccc84bc86ab2aa90d1;p=thirdparty%2Fgit.git Merge branch 'bc/sha1-256-interop-02' The code to maintain mapping between object names in multiple hash functions is being added, written in Rust. * bc/sha1-256-interop-02: object-file-convert: always make sure object ID algo is valid rust: add a small wrapper around the hashfile code rust: add a new binary object map format rust: add functionality to hash an object rust: add a build.rs script for tests rust: fix linking binaries with cargo hash: expose hash context functions to Rust write-or-die: add an fsync component for the object map csum-file: define hashwrite's count as a uint32_t rust: add additional helpers for ObjectID hash: add a function to look up hash algo structs rust: add a hash algorithm abstraction rust: add a ObjectID struct hash: use uint32_t for object_id algorithm conversion: don't crash when no destination algo repository: require Rust support for interoperability --- 8194f1795bf0ca36f245adccc84bc86ab2aa90d1 diff --cc repository.c index 8717a1693a,08422d2188..0b8f7ec200 --- a/repository.c +++ b/repository.c @@@ -1,9 -1,9 +1,10 @@@ #include "git-compat-util.h" #include "abspath.h" #include "repository.h" +#include "hook.h" #include "odb.h" #include "config.h" + #include "gettext.h" #include "object.h" #include "lockfile.h" #include "path.h" diff --cc repository.h index 7830eb7d4b,46a3beabec..078059a6e0 --- a/repository.h +++ b/repository.h @@@ -220,11 -202,10 +220,11 @@@ struct set_gitdir_args void repo_set_gitdir(struct repository *repo, const char *root, const struct set_gitdir_args *extra_args); void repo_set_worktree(struct repository *repo, const char *path); - void repo_set_hash_algo(struct repository *repo, int algo); - void repo_set_compat_hash_algo(struct repository *repo, int compat_algo); + void repo_set_hash_algo(struct repository *repo, uint32_t algo); + void repo_set_compat_hash_algo(struct repository *repo, uint32_t compat_algo); void repo_set_ref_storage_format(struct repository *repo, - enum ref_storage_format format); + enum ref_storage_format format, + const char *payload); void initialize_repository(struct repository *repo); RESULT_MUST_BE_USED int repo_init(struct repository *r, const char *gitdir, const char *worktree);