Re: [External] Document ability to disable template directory in git-init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 3, 2025 at 10:51 PM Boris Kolpackov <boris@xxxxxxxxxxxxxxxxx> wrote:
> Looking at the code, this undocumented (AFAICS) behavior appears to
> be there at least from git 2.1:

Digging through the changelog, I think the feature is added in v1.5.6.4:

 "git init --template=" with blank "template" parameter linked files
 under root directories to .git, which was a total nonsense.  Instead, it
 means "I do not want to use anything from the template directory".

> I would like to suggest that we document this behavior so that it can
> be relied upon. The motivation for omitting the default template are
> repositories created by tools, such as package managers, for the sole
> purpose of fetching some information from remotes. In this case all
> the stuff copied from the template (such as hooks) is an unnecessary
> waste of time and space.
I've seen some package managers pass "--template=" to git-clone, I'd
say this is a widely used undocumented feature :P
Document the behavior would help people understand the existing
usages of --template=

Thanks.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux