Re: dotfiles in git template dir are not copied
- From
Jeff King <peff@peff.net>
- Date
- Feb 17, 2017, 20:44 UTC
- Message-ID
- <20170217204411.2yixhuazgczxmmxa@sigill.intra.peff.net>
- In-Reply-To
- <ebd661c3-7d99-54d2-dda9-09c4a76cfe93@greg0ire.fr>
On Fri, Feb 17, 2017 at 10:31:37AM +0100, greg0ire wrote:
Show 7 quoted lines
> 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?
I think it's probably a feature. You could, for example, have your template directory itself be a git repository. You would not want to copy the ".git" directory around.
I wouldn't be surprised if the documentation could be improved, though.
-Peff