diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-07-17 09:30:56 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-17 09:30:56 -0700 |
| commit | 86c9c14eb9c7bfa20efd8d65f1aaa685282b7221 (patch) | |
| tree | fd758d24e1db2726312822e7f8e5d1ffcdd13444 /bundle.c | |
| parent | The eleventh batch (diff) | |
| parent | Enable SHA-256 by default in breaking changes mode (diff) | |
| download | git-86c9c14eb9c7bfa20efd8d65f1aaa685282b7221.tar.gz git-86c9c14eb9c7bfa20efd8d65f1aaa685282b7221.zip | |
Merge branch 'bc/use-sha256-by-default-in-3.0' into ps/config-wo-the-repository
* bc/use-sha256-by-default-in-3.0:
Enable SHA-256 by default in breaking changes mode
help: add a build option for default hash
t5300: choose the built-in hash outside of a repo
t4042: choose the built-in hash outside of a repo
t1007: choose the built-in hash outside of a repo
t: default to compile-time default hash if not set
setup: use the default algorithm to initialize repo format
Use legacy hash for legacy formats
builtin: use default hash when outside a repository
hash: add a constant for the legacy hash algorithm
hash: add a constant for the default hash algorithm
Diffstat (limited to 'bundle.c')
| -rw-r--r-- | bundle.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -95,7 +95,7 @@ int read_bundle_header_fd(int fd, struct bundle_header *header, * by an "object-format=" capability, which is being handled in * `parse_capability()`. */ - header->hash_algo = &hash_algos[GIT_HASH_SHA1]; + header->hash_algo = &hash_algos[GIT_HASH_SHA1_LEGACY]; /* The bundle header ends with an empty line */ while (!strbuf_getwholeline_fd(&buf, fd, '\n') && @@ -507,7 +507,7 @@ int create_bundle(struct repository *r, const char *path, * SHA1. * 2. @filter is required because we parsed an object filter. */ - if (the_hash_algo != &hash_algos[GIT_HASH_SHA1] || revs.filter.choice) + if (the_hash_algo != &hash_algos[GIT_HASH_SHA1_LEGACY] || revs.filter.choice) min_version = 3; if (argc > 1) { |
