]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'bc/sha-256-part-1-of-4'
authorJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2020 00:11:20 +0000 (17:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Mar 2020 00:11:20 +0000 (17:11 -0700)
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
  ...

13 files changed:
1  2 
builtin/clone.c
builtin/commit.c
builtin/init-db.c
builtin/pack-objects.c
cache.h
config.mak.dev
path.c
sequencer.c
setup.c
sha1-file.c
t/t1450-fsck.sh
t/t9300-fast-import.sh
worktree.c

diff --cc builtin/clone.c
Simple merge
Simple merge
Simple merge
index 02aa6ee4808a96f264a861bc49789341179056be,fceac7b4625eb1705c24e0eaac44f766a067ae40..4c2bb170c6748a4d96f0056ffed361fd3a5174e7
@@@ -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 cache.h
Simple merge
diff --cc config.mak.dev
Simple merge
diff --cc path.c
index 0a42ceb3fb54d31e1830f73b67da078d4b625645,a10b62c0c48a4cd5993aebd3eeed4222fd1e31b2..9bd717c3073f4f4af8d69a14f18ec94f06079c6e
--- 1/path.c
--- 2/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;
        }
  
diff --cc sequencer.c
Simple merge
diff --cc setup.c
Simple merge
diff --cc sha1-file.c
Simple merge
diff --cc t/t1450-fsck.sh
Simple merge
Simple merge
diff --cc worktree.c
Simple merge