summaryrefslogtreecommitdiff
path: root/builtin-init-db.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-19 01:38:18 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-19 01:38:18 -0800
commit5fed4668153c9ca6e44ec84a0976089f515705aa (patch)
tree82f3ce0d2ea76ca31cebd3a5b40d0993e019859a /builtin-init-db.c
parent63085fabbdeaad9eb8b29d39d0998c704e6cd232 (diff)
parent8683a45d66967b0969516a2b72cdbf136c2064a2 (diff)
downloadgit-5fed4668153c9ca6e44ec84a0976089f515705aa.tar.gz
Merge branch 'jc/test-clone' into jc/clone
* jc/test-clone: (35 commits) 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 rerere: fix breakage of resolving. Add config example with respect to branch Add documentation for show-branch --topics make git a bit less cryptic on fetch errors make patch_delta() error cases a bit more verbose racy-git: documentation updates. show-ref: fix --exclude-existing parse-remote::expand_refs_wildcard() vim syntax: follow recent changes to commit template show-ref: fix --verify --hash=length show-ref: fix --quiet --verify avoid accessing _all_ loose refs in git-show-ref --verify git-fetch: Avoid reading packed refs over and over again Teach show-branch how to show ref-log data. markup fix in svnimport documentation. Documentation: new option -P for git-svnimport Fix mis-mark-up in git-merge-file.txt documentation ...
Diffstat (limited to 'builtin-init-db.c')
-rw-r--r--builtin-init-db.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin-init-db.c b/builtin-init-db.c
index 1d7d15e8d5..c8ed5c2a0b 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("GIT_TEMPLATE_DIR");
+ 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] != '/') {