From: Junio C Hamano Date: Fri, 27 Mar 2020 00:11:20 +0000 (-0700) Subject: Merge branch 'bc/sha-256-part-1-of-4' X-Git-Tag: v2.27.0-rc0~156 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8cb64e3d4d512a86c1b7b3aa584f11740b3d038;p=thirdparty%2Fgit.git Merge branch 'bc/sha-256-part-1-of-4' SHA-256 transition continues. * bc/sha-256-part-1-of-4: (22 commits) fast-import: add options for rewriting submodules fast-import: add a generic function to iterate over marks fast-import: make find_marks work on any mark set fast-import: add helper function for inserting mark object entries fast-import: permit reading multiple marks files commit: use expected signature header for SHA-256 worktree: allow repository version 1 init-db: move writing repo version into a function builtin/init-db: add environment variable for new repo hash builtin/init-db: allow specifying hash algorithm on command line setup: allow check_repository_format to read repository format t/helper: make repository tests hash independent t/helper: initialize repository if necessary t/helper/test-dump-split-index: initialize git repository t6300: make hash algorithm independent t6300: abstract away SHA-1-specific constants t: use hash-specific lookup tables to define test constants repository: require a build flag to use SHA-256 hex: add functions to parse hex object IDs in any algorithm hex: introduce parsing variants taking hash algorithms ... --- f8cb64e3d4d512a86c1b7b3aa584f11740b3d038 diff --cc builtin/pack-objects.c index 02aa6ee480,fceac7b462..4c2bb170c6 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@@ -880,7 -879,7 +880,7 @@@ static void write_reused_pack_one(size_ len = encode_in_pack_object_header(header, sizeof(header), OBJ_REF_DELTA, size); hashwrite(out, header, len); - hashwrite(out, base_oid.hash, 20); - hashwrite(out, base_sha1, the_hash_algo->rawsz); ++ hashwrite(out, base_oid.hash, the_hash_algo->rawsz); copy_pack_data(out, reuse_packfile, w_curs, cur, next - cur); return; } diff --cc path.c index 0a42ceb3fb,a10b62c0c4..9bd717c307 --- a/path.c +++ b/path.c @@@ -850,8 -850,8 +850,8 @@@ const char *enter_repo(const char *path } if (is_git_directory(".")) { - set_git_dir("."); + set_git_dir(".", 0); - check_repository_format(); + check_repository_format(NULL); return path; }