From: Eric Wong <normalperson@yhbt.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <junkio@cox.net>, git list <git@vger.kernel.org>
Subject: Re: [PATCH] add strcpy_user_path() and use it in init-db.c and git.c
Date: Fri, 30 Dec 2005 15:10:17 -0800 [thread overview]
Message-ID: <20051230231017.GB7165@mail.yhbt.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0512261730170.7716@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Sat, 24 Dec 2005, Eric Wong wrote:
>
> > Junio C Hamano <junkio@cox.net> wrote:
> > > Eric Wong <normalperson@yhbt.net> writes:
> > >
> > > > My home directories have different names on different machines I'm
> > > > on, and I want to avoid having to recompile git for each one.
> > > > I don't have root access to some of them, so installing globally in /usr
> > > > or /usr/local isn't an option, either.
> > >
> > > Then you probably need to use GIT_EXEC_PATH environment
> > > variable.
> >
> > That works with git.c but not init-db. But then again I don't use
> > git-init-db that often. I'll just write a shell script wrapper for the
> > latter if I do.
>
> How about something like this?
Sure, seems reasonable, but I don't feel that strongly towards
making my env getting bigger and bigger all the time.
I've also been comtemplating just using my own wrapper instead of the
default 'git' wrapper (which being in C, is more difficult to customize
on-the-fly than sh or perl). Or have git read a config file from a
user's home directory.
> ---
> [PATCH] Introduce environment variable for the path to the templates
>
> The environment variable GIT_TEMPLATE_PATH can override the compiled-in
> setting, and can be overridden with the '--template=' argument to init-db.
>
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
>
> ---
>
> Eric said that GIT_EXEC_PATH is enough for most things, but not for
> init-db. I guess he wanted something like this.
>
> init-db.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> 5d95ce750b09a14bcb86e07ba23077ab0825089c
> diff --git a/init-db.c b/init-db.c
> index 863ec1a..774a91f 100644
> --- a/init-db.c
> +++ b/init-db.c
> @@ -238,7 +238,7 @@ int main(int argc, char **argv)
> {
> const char *git_dir;
> const char *sha1_dir;
> - char *path, *template_dir = NULL;
> + char *path, *template_dir = getenv("GIT_TEMPLATE_PATH");
> int len, i;
>
> for (i = 1; i < argc; i++, argv++) {
--
Eric Wong
next prev parent reply other threads:[~2005-12-30 23:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-24 12:20 [PATCH] add strcpy_user_path() and use it in init-db.c and git.c Eric Wong
2005-12-24 18:08 ` Junio C Hamano
2005-12-24 19:50 ` Eric Wong
2005-12-24 21:07 ` Junio C Hamano
2005-12-24 21:19 ` Eric Wong
2005-12-26 16:40 ` Johannes Schindelin
2005-12-30 23:10 ` Eric Wong [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-12-26 17:42 Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051230231017.GB7165@mail.yhbt.net \
--to=normalperson@yhbt.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).