summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-04-05 14:15:33 -0700
committerJunio C Hamano <gitster@pobox.com>2023-04-05 14:17:00 -0700
commit8b214c2e9dda8fc5b8d49b978fd2c155b7596cd0 (patch)
tree44f825343f0545ea20ba8f191b18f4756e7b182b /commit.c
parentae73b2c8f1da39c39335ee76a0f95857712c22a7 (diff)
clone: propagate object-format when cloning from void
A user could prepare an empty repository and set it to use SHA256 as the object format. The new repository created by "git clone" from such a repository however would not record that it is expecting objects in the same SHA256 format. This works as expected if the source repository is not empty. Just like we started copying the name of the primary branch from the remote repository even if it is unborn in 3d8314f8 (clone: propagate empty remote HEAD even with other branches, 2022-07-07), lift the code that records the object format out of the block executed only when cloning from an instantiated repository, so that it works also when cloning from an empty repository. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions