"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > From: Johannes Schindelin <johannes.schindelin@xxxxxx> > > It is a real old anachronism from the Cogito days to have a > .git/branches/ directory. And to have tests that ensure that Cogito > users can migrate away from using that directory. > > But so be it, let's continue testing it. > > Let's make sure, however, that git init does not need to create that > directory. > > This bug was noticed when testing with templates that had been > pre-committed, skipping the empty branches/ directory of course because > Git does not track empty directories. Many tests assume that the .git/info/ directory exists, and the only reason why they can is because we have templates/info--exclude; the situation around .git/branches/ is exactly the same. Deprecating .git/branches/ directory and dropping the parts of tests that wants to make sure the support still works (t5516 is not about migration but about working with .git/branches configuration) would be a different matter. Until that happens, let's not do this patch; otherwise it would force us to sprinkle "mkdir -p .git/info/" all over the place for the same rationale. A directory in .git/ created by hardcoded mkdir in "git init" (like .git/refs/) and created by copying templates by "git init" (like .git/info/ and .git/branches) are both "created by 'git init'". Special casing the latter is just silly.