From: Junio C Hamano Date: Wed, 2 Oct 2024 14:46:27 +0000 (-0700) Subject: Merge branch 'tb/weak-sha1-for-tail-sum' X-Git-Tag: v2.47.0-rc1~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ead0a050e2eddf8c67ee3404e165bffd42c6fd42;p=thirdparty%2Fgit.git Merge branch 'tb/weak-sha1-for-tail-sum' The checksum at the tail of files are now computed without collision detection protection. This is safe as the consumer of the information to protect itself from replay attacks checks for hash collisions independently. * tb/weak-sha1-for-tail-sum: csum-file.c: use unsafe SHA-1 implementation when available Makefile: allow specifying a SHA-1 for non-cryptographic uses hash.h: scaffolding for _unsafe hashing variants sha1: do not redefine `platform_SHA_CTX` and friends pack-objects: use finalize_object_file() to rename pack/idx/etc finalize_object_file(): implement collision check finalize_object_file(): refactor unlink_or_warn() placement finalize_object_file(): check for name collision before renaming --- ead0a050e2eddf8c67ee3404e165bffd42c6fd42 diff --cc tmp-objdir.c index c2fb9f9193,9556f8fcdb..9da0071cba --- a/tmp-objdir.c +++ b/tmp-objdir.c @@@ -269,9 -279,9 +281,9 @@@ int tmp_objdir_migrate(struct tmp_objdi } strbuf_addbuf(&src, &t->path); - strbuf_addstr(&dst, get_object_directory()); + strbuf_addstr(&dst, repo_get_object_directory(the_repository)); - ret = migrate_paths(&src, &dst); + ret = migrate_paths(&src, &dst, 0); strbuf_release(&src); strbuf_release(&dst);