Re: [PATCH] new environment variable GIT_TEMPLATE_DIR to override default template
- From
- Matthias Lederhofer <matled@gmx.net>
- Date
- May 28, 2006, 18:15 UTC
- Message-ID
- <E1FkPnB-0005yW-UY@moooo.ath.cx>
- In-Reply-To
- <7v4pzadpfr.fsf@assigned-by-dhcp.cox.net>
> I like the part to let git-clone pass --template down to git-init-db, > but once it is in place I doubt you would still need GIT_TEMPLATE_DIR. > I'd rather not to introduce new environment variables if we can > avoid them.
I like the variable because it makes it very easy to change the default template directory (so I don't have to remember passing --template every time I clone or create a new repository). But aliases/default options (~/.git/config thread) this would make this possible too.
Show 12 quoted lines
> Here, $template is either empty string "", or "--template=dir" > after argument parsing. But then it does this: > > > @@ -203,7 +206,7 @@ trap 'err=$?; cd ..; rm -r "$D"; exit $e > > case "$bare" in > > yes) GIT_DIR="$D" ;; > > *) GIT_DIR="$D/.git" ;; > > -esac && export GIT_DIR && git-init-db || usage > > +esac && export GIT_DIR && git-init-db "$template" || usage > > which I suspect would make git-init-db barf if you did not pass > any --template=foo option to git-clone. Did you test your patch?
Sorry, I did not run make test and did not test it without the option. Shall I send a new patch?