Re: [PATCH] new environment variable GIT_TEMPLATE_DIR to override default template

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.

> 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?
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]