threads / patch / 4306

patch, 2 partsmake init-db use GIT_TEMPLATE_DIR if --template option is not specified

Subject: [PATCH 2/2] make init-db use GIT_TEMPLATE_DIR if --template option is not specified

## tl;dr

One message between May 27, 2006 and May 27, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Matthias Lederhofer· May 27, 2006, 10:25 UTC · lore
---
f61e19360f9b5965dda1ae762ffdab8ede860430
 builtin-init-db.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
f61e19360f9b5965dda1ae762ffdab8ede860430
Show changes to builtin-init-db.c +3 −0
diff --git a/builtin-init-db.c b/builtin-init-db.c
index 2a1384c..cf5bd39 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -253,6 +253,9 @@ int cmd_init_db(int argc, const char **a
 			die(init_db_usage);
 	}
 
+	if (!template_dir)
+		template_dir = getenv("GIT_TEMPLATE_DIR");
+
 	/*
 	 * Set up the default .git directory contents
 	 */
-- 
1.3.3.g40505

← back to recent threads