diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-20 13:56:14 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-20 13:56:14 -0800 |
commit | aa1cef54a2bcc5350df7efe1d1745725c46bf2e3 (patch) | |
tree | b8cbf49ff59b92c36de05d08f2dfd32c4aeb538b /builtin-init-db.c | |
parent | 1d182bd5f4ec17f2f44ac0ee0d1bf6a25e98761e (diff) | |
parent | 4363dfbe3d2f3fe3a4bd0fa7e9b22a14532c6cdb (diff) | |
download | git-aa1cef54a2bcc5350df7efe1d1745725c46bf2e3.tar.gz |
Merge branch 'jc/clone'
* jc/clone:
Move "no merge candidate" warning into git-pull
Use preprocessor constants for environment variable names.
Do not create $GIT_DIR/remotes/ directory anymore.
Introduce GIT_TEMPLATE_DIR
Revert "fix testsuite: make sure they use templates freshly built from the source"
fix testsuite: make sure they use templates freshly built from the source
git-clone: lose the traditional 'no-separate-remote' layout
git-clone: lose the artificial "first" fetch refspec
git-pull: refuse default merge without branch.*.merge
git-clone: use wildcard specification for tracking branches
Diffstat (limited to 'builtin-init-db.c')
-rw-r--r-- | builtin-init-db.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin-init-db.c b/builtin-init-db.c index 1d7d15e8d5..01f366ad0b 100644 --- a/builtin-init-db.c +++ b/builtin-init-db.c @@ -124,8 +124,11 @@ static void copy_templates(const char *git_dir, int len, const char *template_di int template_len; DIR *dir; - if (!template_dir) - template_dir = DEFAULT_GIT_TEMPLATE_DIR; + if (!template_dir) { + template_dir = getenv(TEMPLATE_DIR_ENVIRONMENT); + if (!template_dir) + template_dir = DEFAULT_GIT_TEMPLATE_DIR; + } strcpy(template_path, template_dir); template_len = strlen(template_path); if (template_path[template_len-1] != '/') { |