dotfiles in git template dir are not copied
- From
greg0ire <postmaster@greg0ire.fr>
- Date
- Feb 17, 2017, 09:31 UTC
- Message-ID
- <ebd661c3-7d99-54d2-dda9-09c4a76cfe93@greg0ire.fr>
Hi,
I noticed yesterday that dotfiles inside the directory configured in init.templatedir are not copied when creating a new repository.
Here is the line I think is responsible for this behavior : https://github.com/git/git/blob/master/builtin/init-db.c#L48
Is it a bug or a feature?
Steps to reproduce, provided you already have a template dir configured :
cd $(git config --path --get init.templatedir) touch copied touch .not_copied cd /tmp mkdir whatever cd whatever git init ls -la .git
On my machine, the last command does not list .not_copied .
-- greg0ire