git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Petr Baudis <pasky@ucw.cz>
Date
May 27, 2006, 13:25 UTC
Message-ID
<20060527132554.GC10488@pasky.or.cz>

Dear diary, on Sat, May 27, 2006 at 12:25:39PM CEST, I got a letter where Matthias Lederhofer <matled@gmx.net> said that...

Show 15 quoted lines
> f61e19360f9b5965dda1ae762ffdab8ede860430
> 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
>  	 */
Please document such changes, in the spirit of
diff --git a/Documentation/git-init-db.txt b/Documentation/git-init-db.txt
index 8a150d8..378810e 100644
--- a/Documentation/git-init-db.txt
+++ b/Documentation/git-init-db.txt
@@ -15,6 +15,8 @@ OPTIONS
 -------
 --template=<template_directory>::
 	Provide the directory from which templates will be used.
+	If not specified, the value of the `GIT_TEMPLATE_DIR` environment
+	variable is used instead.
 	The default template directory is `/usr/share/git-core/templates`.
 
 --shared::

(Signed-off-by: Petr Baudis <pasky@suse.cz>, whatever...)
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.
Next: Matthias Lederhofer
Message 1 of 4 in “Re: [PATCH 2/2] make init-db use GIT_TEMPLATE_DIR if --template option is not specified”
  1. Petr BaudisMay 27, 2006
  2. new environment variable GIT_TEMPLATE_DIR to override default templateMatthias Lederhofer, May 27, 2006
  3. Junio C HamanoMay 28, 2006
  4. Matthias LederhoferMay 28, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.