@matheusbsbs / matheus-bagliano / commits / d8a8488d56
Fork 0

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 <sdrake@xnet.co.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Steven Drake committed Feb 17, 2010 at 12:44 UTC d8a8488d569420c4e0a96a8df36b246d888e68d4
3 files changed +26 -10
Documentation/config.txt
+4
@@ -1200,6 +1200,10 @@ imap::
1200 The configuration variables in the 'imap' section are described
1201 in linkgit:git-imap-send[1].
1202
1203 +init.templatedir::
1204 + Specify the directory from which templates will be copied.
1205 + (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
1206 +
1207 instaweb.browser::
1208 Specify the program that will be used to browse your working
1209 repository in gitweb. See linkgit:git-instaweb[1].
Documentation/git-clone.txt
+1 -2
@@ -149,8 +149,7 @@ objects from the source repository into a pack in the cloned repository.
149
150 --template=<template_directory>::
151 Specify the directory from which templates will be used;
152 - if unset the templates are taken from the installation
153 - defined default, typically `/usr/share/git-core/templates`.
152 + (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
153
154 --depth <depth>::
155 Create a 'shallow' clone with a history truncated to the
Documentation/git-init.txt
+21 -8
@@ -28,14 +28,8 @@ current working directory.
28
29 --template=<template_directory>::
30
31 -Provide the directory from which templates will be used. The default template
32 -directory is `/usr/share/git-core/templates`.
33 -
34 -When specified, `<template_directory>` is used as the source of the template
35 -files rather than the default. The template files include some directory
36 -structure, some suggested "exclude patterns", and copies of non-executing
37 -"hook" files. The suggested patterns and hook files are all modifiable and
38 -extensible.
31 +Specify the directory from which templates will be used. (See the "TEMPLATE
32 +DIRECTORY" section below.)
33
34 --shared[={false|true|umask|group|all|world|everybody|0xxx}]::
35
@@ -106,6 +100,25 @@ of the repository, such as installing the default hooks and
100 setting the configuration variables. The old name is retained
101 for backward compatibility reasons.
102
103 +TEMPLATE DIRECTORY
104 +------------------
105 +
106 +The template directory contains files and directories that will be copied to
107 +the `$GIT_DIR` after it is created.
108 +
109 +The template directory used will (in order):
110 +
111 + - The argument given with the `--template` option.
112 +
113 + - The contents of the `$GIT_TEMPLATE_DIR` environment variable.
114 +
115 + - The `init.templatedir` configuration variable.
116 +
117 + - The default template directory: `/usr/share/git-core/templates`.
118 +
119 +The default template directory includes some directory structure, some
120 +suggested "exclude patterns", and copies of sample "hook" files.
121 +The suggested patterns and hook files are all modifiable and extensible.
122
123 EXAMPLES
124 --------