commit 9a47928d7746d1846dc6abd053c080bfbcf6640fe3fa3e30ce16e2ff69d0dc97 from: Stefan Sperling date: Wed May 20 20:15:41 2026 UTC always create initial Git config files when cloning For SHA256 network support we must always create configuration files as soon as server-side capabilities have been announced. Otherwise we cannot reliably stamp the repository with the correct object format. test_clone_dangling_headref is triggering this condition. We don't have symrefs (only an explicit -b foo) so we never switch the repo to sha256 format. Requiring symrefs for creation of the initial Git config is no longer necessary. If the server does not send announce a HEAD symref as part of its capabilities then we have workarounds for this in got.c:cmd_clone(). The workarounds did not yet exist when the condition removed here was added. commit - 890ae5277c00c0e48ef315804501c6f51abecfd5f11bd42fc838bf9bf355b51f commit + 9a47928d7746d1846dc6abd053c080bfbcf6640fe3fa3e30ce16e2ff69d0dc97 blob - 2a90e55edc45b336d5b71041ba562f14d591a1c6afe646d55607fba9700167a9 blob + df6f0560489010a429efe97ab2c59364e827beae09a0e649d344b3d5a46f9b58 --- got/got.c +++ got/got.c @@ -1127,8 +1127,7 @@ fetch_progress(void *arg, const char *message, off_t p * Once the server has sent information about its default branch * we have all required information. */ - if (a->create_configs && !a->configs_created && - !RB_EMPTY(a->config_info.symrefs)) { + if (a->create_configs && !a->configs_created) { if (a->config_info.expected_algo == -1 && pack_hash->algo == GOT_HASH_SHA256) { err = got_repo_init_gitconfig(a->repo,