From: Steven Drake Date: Tue, 16 Feb 2010 23:44:46 +0000 (+1300) Subject: Add a "TEMPLATE DIRECTORY" section to git-init[1]. X-Git-Tag: v1.7.1-rc0~72^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d8a8488d569420c4e0a96a8df36b246d888e68d4;p=git.git Add a "TEMPLATE DIRECTORY" section to git-init[1]. Create a more inoformative section to describe template directory and refer to it in config.txt and with the '--template' option of git-init and git-clone commands. Signed-off-by: Steven Drake Signed-off-by: Junio C Hamano --- diff --git a/Documentation/config.txt b/Documentation/config.txt index 4c36aa95b..310d36b20 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1200,6 +1200,10 @@ imap:: The configuration variables in the 'imap' section are described in linkgit:git-imap-send[1]. +init.templatedir:: + Specify the directory from which templates will be copied. + (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].) + instaweb.browser:: Specify the program that will be used to browse your working repository in gitweb. See linkgit:git-instaweb[1]. diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index f43c8b2c0..3919b7d44 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -149,8 +149,7 @@ objects from the source repository into a pack in the cloned repository. --template=:: Specify the directory from which templates will be used; - if unset the templates are taken from the installation - defined default, typically `/usr/share/git-core/templates`. + (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].) --depth :: Create a 'shallow' clone with a history truncated to the diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index 7ee102da4..246b07ebf 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -28,14 +28,8 @@ current working directory. --template=:: -Provide the directory from which templates will be used. The default template -directory is `/usr/share/git-core/templates`. - -When specified, `` is used as the source of the template -files rather than the default. The template files include some directory -structure, some suggested "exclude patterns", and copies of non-executing -"hook" files. The suggested patterns and hook files are all modifiable and -extensible. +Specify the directory from which templates will be used. (See the "TEMPLATE +DIRECTORY" section below.) --shared[={false|true|umask|group|all|world|everybody|0xxx}]:: @@ -106,6 +100,25 @@ of the repository, such as installing the default hooks and setting the configuration variables. The old name is retained for backward compatibility reasons. +TEMPLATE DIRECTORY +------------------ + +The template directory contains files and directories that will be copied to +the `$GIT_DIR` after it is created. + +The template directory used will (in order): + + - The argument given with the `--template` option. + + - The contents of the `$GIT_TEMPLATE_DIR` environment variable. + + - The `init.templatedir` configuration variable. + + - The default template directory: `/usr/share/git-core/templates`. + +The default template directory includes some directory structure, some +suggested "exclude patterns", and copies of sample "hook" files. +The suggested patterns and hook files are all modifiable and extensible. EXAMPLES --------