git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Configuring the location of ~/.gitconfig
@ 2012-09-26 14:14 Ramkumar Ramachandra
  2012-09-26 18:34 ` David Aguilar
  2012-09-27  6:09 ` Configuring the location of ~/.gitconfig Junio C Hamano
  0 siblings, 2 replies; 14+ messages in thread
From: Ramkumar Ramachandra @ 2012-09-26 14:14 UTC (permalink / raw)
  To: Git List; +Cc: Anurag Priyam

Hi,

I'd like to configure the location of ~/.gitconfig through an
environment variable.  My usecase is a simple enough: I have a
repository with all my dotfiles, and I don't want to symlink
~/dotfiles/.gitconfig from $HOME after cloning it.  Does anyone else
think the feature will be useful?

A couple of similar examples:
1. The git templates directory is configurable via the
GIT_TEMPLATE_DIR variable.
2. The location of ~/.zshrc, ~/.zlogin etc is configurable via the
ZDOTDIR variable in ZSH.

Ram

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Configuring the location of ~/.gitconfig
  2012-09-26 14:14 Configuring the location of ~/.gitconfig Ramkumar Ramachandra
@ 2012-09-26 18:34 ` David Aguilar
  2012-09-27  6:49   ` Ramkumar Ramachandra
  2012-09-27  6:09 ` Configuring the location of ~/.gitconfig Junio C Hamano
  1 sibling, 1 reply; 14+ messages in thread
From: David Aguilar @ 2012-09-26 18:34 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: Git List, Anurag Priyam

On Wed, Sep 26, 2012 at 7:14 AM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
> Hi,
>
> I'd like to configure the location of ~/.gitconfig through an
> environment variable.  My usecase is a simple enough: I have a
> repository with all my dotfiles, and I don't want to symlink
> ~/dotfiles/.gitconfig from $HOME after cloning it.  Does anyone else
> think the feature will be useful?
>
> A couple of similar examples:
> 1. The git templates directory is configurable via the
> GIT_TEMPLATE_DIR variable.
> 2. The location of ~/.zshrc, ~/.zlogin etc is configurable via the
> ZDOTDIR variable in ZSH.

There was some work recently to teach git about the XDG_CONFIG_HOME variable.

Would that help, or are the XDG variables too global for your usage?
-- 
David

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Configuring the location of ~/.gitconfig
  2012-09-26 14:14 Configuring the location of ~/.gitconfig Ramkumar Ramachandra
  2012-09-26 18:34 ` David Aguilar
@ 2012-09-27  6:09 ` Junio C Hamano
  2012-09-27  6:40   ` Anurag Priyam
  1 sibling, 1 reply; 14+ messages in thread
From: Junio C Hamano @ 2012-09-27  6:09 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: Git List, Anurag Priyam

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> I'd like to configure the location of ~/.gitconfig through an
> environment variable.  My usecase is a simple enough: I have a
> repository with all my dotfiles, and I don't want to symlink
> ~/dotfiles/.gitconfig from $HOME after cloning it.  Does anyone else
> think the feature will be useful?

Not me. For that particular use case, my approach (long before I
switched the vcs that controls my dotfiles to git) have always been
to have ~/src that is version controlled, with a Makefile that
builds/adjusts dotfiles appropriately for each box and installs them
in the proper place.

Of course, if .gitconfig _is_ the same across all boxes I use, that
Makefile is likely to "install" by making a symlink ~/.gitconfig
that points at src/dot/gitconfig without "building".

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Configuring the location of ~/.gitconfig
  2012-09-27  6:09 ` Configuring the location of ~/.gitconfig Junio C Hamano
@ 2012-09-27  6:40   ` Anurag Priyam
  2012-09-27 17:16     ` Junio C Hamano
  0 siblings, 1 reply; 14+ messages in thread
From: Anurag Priyam @ 2012-09-27  6:40 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Ramkumar Ramachandra, Git List

On Thu, Sep 27, 2012 at 11:39 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> I'd like to configure the location of ~/.gitconfig through an
>> environment variable.  My usecase is a simple enough: I have a
>> repository with all my dotfiles, and I don't want to symlink
>> ~/dotfiles/.gitconfig from $HOME after cloning it.  Does anyone else
>> think the feature will be useful?
>
> Not me. For that particular use case, my approach (long before I
> switched the vcs that controls my dotfiles to git) have always been
> to have ~/src that is version controlled, with a Makefile that
> builds/adjusts dotfiles appropriately for each box and installs them
> in the proper place.

Makefile is what I wanted to avoid when I suggested Ram that maybe Git
could _optionally_ read the location of global gitconfig from an
environment variable that can be exported in zshenv or bash_profile.

I don't think either way is the best way of managing dotfiles.  Just a
matter of preference.  The environment variable approach doesn't
require you to run `make` everytime you sync your dotfiles across
different machines, and that is what I like.

Also, Git allows configuring the location of template directory via an
environment variable (GIT_TEMPLATE_DIR).  Since Git has already fixed
the location of global gitconfig, it might as well read the location
of template directory from there (init.templatedir).  Why the added
flexibility?  Well, I have been exploiting the feature to manage git
templates through my zsh configuration.

-- 
Anurag Priyam

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Configuring the location of ~/.gitconfig
  2012-09-26 18:34 ` David Aguilar
@ 2012-09-27  6:49   ` Ramkumar Ramachandra
  2012-09-27 14:46     ` [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig Ramkumar Ramachandra
  0 siblings, 1 reply; 14+ messages in thread
From: Ramkumar Ramachandra @ 2012-09-27  6:49 UTC (permalink / raw)
  To: David Aguilar; +Cc: Git List, Anurag Priyam

Hi David,

David Aguilar wrote:
> Would that help, or are the XDG variables too global for your usage?

Yeah, they're too global.  I'll write a patch.

Ram

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig
  2012-09-27  6:49   ` Ramkumar Ramachandra
@ 2012-09-27 14:46     ` Ramkumar Ramachandra
  2012-09-27 16:57       ` Matthieu Moy
                         ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Ramkumar Ramachandra @ 2012-09-27 14:46 UTC (permalink / raw)
  To: Git List; +Cc: David Aguilar, Anurag Priyam, Junio C Hamano


Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 Documentation/git-config.txt |    3 +++
 path.c                       |    5 +++++
 t/t1306-xdg-files.sh         |    8 ++++++++
 3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index eaea079..c8db03f 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -205,6 +205,9 @@ $GIT_DIR/config::
 	User-specific configuration file. Also called "global"
 	configuration file.
 
+$GIT_GLOBAL_CONFIG::
+	Overrides the path of the global configuration file.
+
 $XDG_CONFIG_HOME/git/config::
 	Second user-specific configuration file. If $XDG_CONFIG_HOME is not set
 	or empty, $HOME/.config/git/config will be used. Any single-valued
diff --git a/path.c b/path.c
index cbbdf7d..9b09cee 100644
--- a/path.c
+++ b/path.c
@@ -131,10 +131,15 @@ char *git_path(const char *fmt, ...)
 
 void home_config_paths(char **global, char **xdg, char *file)
 {
+	char *global_config = getenv("GIT_GLOBAL_CONFIG");
 	char *xdg_home = getenv("XDG_CONFIG_HOME");
 	char *home = getenv("HOME");
 	char *to_free = NULL;
 
+	if (global_config) {
+		*global = mkpathdup("%s", global_config);
+		return;
+	}
 	if (!home) {
 		if (global)
 			*global = NULL;
diff --git a/t/t1306-xdg-files.sh b/t/t1306-xdg-files.sh
index 8b14ab1..5b0e08e 100755
--- a/t/t1306-xdg-files.sh
+++ b/t/t1306-xdg-files.sh
@@ -28,6 +28,14 @@ test_expect_success 'read config: xdg file exists and ~/.gitconfig exists' '
 	test_cmp expected actual
 '
 
+test_expect_success 'read config: $GIT_GLOBAL_CONFIG is set and ~/.gitconfig exists' '
+	>.gitconfig &&
+	echo "[alias]" >.gittestconfig &&
+	echo "	myalias = !echo in_gitconfig" >>.gittestconfig &&
+	echo in_gitconfig >expected &&
+	GIT_GLOBAL_CONFIG=~/.gittestconfig git myalias >actual &&
+	test_cmp expected actual
+'
 
 test_expect_success 'read with --get: xdg file exists and ~/.gitconfig doesn'\''t' '
 	rm .gitconfig &&
-- 
1.7.8.1.362.g5d6df.dirty

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig
  2012-09-27 14:46     ` [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig Ramkumar Ramachandra
@ 2012-09-27 16:57       ` Matthieu Moy
  2012-09-27 17:50         ` Junio C Hamano
  2012-09-27 17:27       ` Junio C Hamano
  2012-09-27 17:35       ` Jeff King
  2 siblings, 1 reply; 14+ messages in thread
From: Matthieu Moy @ 2012-09-27 16:57 UTC (permalink / raw)
  To: Ramkumar Ramachandra
  Cc: Git List, David Aguilar, Anurag Priyam, Junio C Hamano

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index eaea079..c8db03f 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -205,6 +205,9 @@ $GIT_DIR/config::
>  	User-specific configuration file. Also called "global"
>  	configuration file.
>  
> +$GIT_GLOBAL_CONFIG::
> +	Overrides the path of the global configuration file.
> +

I'm not particularly in favor of introducing another environment
variable, but if you are to introduce it, why just override the
configuration file, and not $HOME completely (e.g. to override
$HOME/.git-credentials too).

There was a patch proposing that here ($GIT_HOME to override $HOME):

  http://thread.gmane.org/gmane.comp.version-control.git/135447/focus=135494

I don't remember exactly what happened to the patch, I can't find an
explicit reason to reject it in the thread, but it seems it didn't make
its way to git.git.

> index cbbdf7d..9b09cee 100644
> --- a/path.c
> +++ b/path.c
> @@ -131,10 +131,15 @@ char *git_path(const char *fmt, ...)
>  
>  void home_config_paths(char **global, char **xdg, char *file)
>  {
> +	char *global_config = getenv("GIT_GLOBAL_CONFIG");
>  	char *xdg_home = getenv("XDG_CONFIG_HOME");
>  	char *home = getenv("HOME");
>  	char *to_free = NULL;
>  
> +	if (global_config) {
> +		*global = mkpathdup("%s", global_config);
> +		return;
> +	}

If you return here, haven't you completely broken the XDG stuff, since
*xdg is set a few lines below in the function?

Also, I guess home_config_paths(..., "ignore") will return the path to
the configuration file instead of the ignore file?

> --- a/t/t1306-xdg-files.sh
> +++ b/t/t1306-xdg-files.sh
> @@ -28,6 +28,14 @@ test_expect_success 'read config: xdg file exists and ~/.gitconfig exists' '
>  	test_cmp expected actual
>  '
>  
> +test_expect_success 'read config: $GIT_GLOBAL_CONFIG is set and ~/.gitconfig exists' '
> +	>.gitconfig &&
> +	echo "[alias]" >.gittestconfig &&
> +	echo "	myalias = !echo in_gitconfig" >>.gittestconfig &&
> +	echo in_gitconfig >expected &&
> +	GIT_GLOBAL_CONFIG=~/.gittestconfig git myalias >actual &&
> +	test_cmp expected actual
> +'

You should check that "git config --set" works too, as the codepath for
writing to configuration is relatively different from the one to read.
For example, I *think* that "git config --global" will write to
$GIT_GLOBAL_CONFIG and "git config" without --global will ignore it, but
a test would be welcome.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Configuring the location of ~/.gitconfig
  2012-09-27  6:40   ` Anurag Priyam
@ 2012-09-27 17:16     ` Junio C Hamano
  0 siblings, 0 replies; 14+ messages in thread
From: Junio C Hamano @ 2012-09-27 17:16 UTC (permalink / raw)
  To: Anurag Priyam; +Cc: Ramkumar Ramachandra, Git List

Anurag Priyam <anurag08priyam@gmail.com> writes:

>> Not me. For that particular use case, my approach (long before I
>> switched the vcs that controls my dotfiles to git) have always been
>> to have ~/src that is version controlled, with a Makefile that
>> builds/adjusts dotfiles appropriately for each box and installs them
>> in the proper place.
>
> Makefile is what I wanted to avoid when I suggested Ram that maybe Git
> could _optionally_ read the location of global gitconfig from an
> environment variable that can be exported in zshenv or bash_profile.

Where exactly do the "zshenv" and "bash_profile" you mention reside,
and how are their contents kept up to date?  I am guessing it is
/net/srv1/home/ram/.bash_profile on machines that mount user home
directories from srv1 NFS server and it is to have a string like
"export GITCONFIG_FILE=/net/srv1/home/ram/dot/gitconfig" or on those
machines.  The contents of ~ram/dot/gitconfig may be able to stay
the same across boxes, but how is ~ram/.bash_profile is set up?
Manually?

Again, I am not personally interested; I think aversion of Make is
the root cause of the disease.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig
  2012-09-27 14:46     ` [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig Ramkumar Ramachandra
  2012-09-27 16:57       ` Matthieu Moy
@ 2012-09-27 17:27       ` Junio C Hamano
  2012-09-27 17:35       ` Jeff King
  2 siblings, 0 replies; 14+ messages in thread
From: Junio C Hamano @ 2012-09-27 17:27 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: Git List, David Aguilar, Anurag Priyam

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  Documentation/git-config.txt |    3 +++
>  path.c                       |    5 +++++
>  t/t1306-xdg-files.sh         |    8 ++++++++
>  3 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index eaea079..c8db03f 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -205,6 +205,9 @@ $GIT_DIR/config::
>  	User-specific configuration file. Also called "global"
>  	configuration file.
>  
> +$GIT_GLOBAL_CONFIG::
> +	Overrides the path of the global configuration file.
> +

Why is this even a good idea?

  - Does it make sense not to read $HOME/.gitconfig or XDG stuff
    when this is set?  Why skip them?  If it makes sense to skip
    them, why doesn't it also skip $GIT_DIR/config and/or
    /etc/gitconfig?

  - Why is it not "the third user-specific configuration file" instead?

  - Why is it not "a list of paths to read configurations from"?

  - Where does it end?

Not overly impressed, I'd have to say.

> diff --git a/path.c b/path.c
> index cbbdf7d..9b09cee 100644
> --- a/path.c
> +++ b/path.c
> @@ -131,10 +131,15 @@ char *git_path(const char *fmt, ...)
>  
>  void home_config_paths(char **global, char **xdg, char *file)
>  {
> +	char *global_config = getenv("GIT_GLOBAL_CONFIG");
>  	char *xdg_home = getenv("XDG_CONFIG_HOME");
>  	char *home = getenv("HOME");
>  	char *to_free = NULL;
>  
> +	if (global_config) {
> +		*global = mkpathdup("%s", global_config);
> +		return;
> +	}
>  	if (!home) {
>  		if (global)
>  			*global = NULL;
> diff --git a/t/t1306-xdg-files.sh b/t/t1306-xdg-files.sh
> index 8b14ab1..5b0e08e 100755
> --- a/t/t1306-xdg-files.sh
> +++ b/t/t1306-xdg-files.sh
> @@ -28,6 +28,14 @@ test_expect_success 'read config: xdg file exists and ~/.gitconfig exists' '
>  	test_cmp expected actual
>  '
>  
> +test_expect_success 'read config: $GIT_GLOBAL_CONFIG is set and ~/.gitconfig exists' '
> +	>.gitconfig &&
> +	echo "[alias]" >.gittestconfig &&
> +	echo "	myalias = !echo in_gitconfig" >>.gittestconfig &&
> +	echo in_gitconfig >expected &&
> +	GIT_GLOBAL_CONFIG=~/.gittestconfig git myalias >actual &&

How is this tilde expanded and by whom?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig
  2012-09-27 14:46     ` [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig Ramkumar Ramachandra
  2012-09-27 16:57       ` Matthieu Moy
  2012-09-27 17:27       ` Junio C Hamano
@ 2012-09-27 17:35       ` Jeff King
  2012-09-27 19:57         ` Junio C Hamano
                           ` (2 more replies)
  2 siblings, 3 replies; 14+ messages in thread
From: Jeff King @ 2012-09-27 17:35 UTC (permalink / raw)
  To: Ramkumar Ramachandra
  Cc: Git List, David Aguilar, Anurag Priyam, Junio C Hamano

On Thu, Sep 27, 2012 at 08:16:11PM +0530, Ramkumar Ramachandra wrote:

> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index eaea079..c8db03f 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -205,6 +205,9 @@ $GIT_DIR/config::
>  	User-specific configuration file. Also called "global"
>  	configuration file.
>  
> +$GIT_GLOBAL_CONFIG::
> +	Overrides the path of the global configuration file.
> +

Like the other reviews, I am not overly enthused. If we are going to add
a new variable, I think $GIT_HOME makes a lot more sense. But it really
sounds like using $XDG_CONFIG_HOME would be even simpler.

Also, have you considered using a config include? Like:

  $ echo '[include]path = ~/my-dotfiles/gitconfig' >~/.gitconfig

It's a one-time setup, and then you get updates inside my-dotfiles
forever. The one-time setup is annoying, but you have to bootstrap
somehow (e.g., you're going to have to copy a .profile or similar to get
the GIT_GLOBAL_CONFIG variable set).

-Peff

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig
  2012-09-27 16:57       ` Matthieu Moy
@ 2012-09-27 17:50         ` Junio C Hamano
  0 siblings, 0 replies; 14+ messages in thread
From: Junio C Hamano @ 2012-09-27 17:50 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: Ramkumar Ramachandra, Git List, David Aguilar, Anurag Priyam

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
>> index eaea079..c8db03f 100644
>> --- a/Documentation/git-config.txt
>> +++ b/Documentation/git-config.txt
>> @@ -205,6 +205,9 @@ $GIT_DIR/config::
>>  	User-specific configuration file. Also called "global"
>>  	configuration file.
>>  
>> +$GIT_GLOBAL_CONFIG::
>> +	Overrides the path of the global configuration file.
>> +
>
> I'm not particularly in favor of introducing another environment
> variable, but if you are to introduce it, why just override the
> configuration file, and not $HOME completely (e.g. to override
> $HOME/.git-credentials too).
>
> There was a patch proposing that here ($GIT_HOME to override $HOME):

I think both of these are at the entrance of slippery slope to
insanity I'd rather not to venture into.

If somebody hates ~/.dotmanyfiles so much, why not do HOME=~/dots/,
instead of having to set GIT_HOME to move ~/.gitconfig, FROTZ_HOME
to move ~/.frotzconfig, MAIL_HOME to move ~/.mailrc, etc.?

I wouldn't be surprised if some _other_ things break with your HOME
pointing at a directory inside your home directory, but then it may
be better to fix that other thing instead.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig
  2012-09-27 17:35       ` Jeff King
@ 2012-09-27 19:57         ` Junio C Hamano
  2012-09-27 20:51         ` Matthieu Moy
  2012-09-28  7:05         ` Ramkumar Ramachandra
  2 siblings, 0 replies; 14+ messages in thread
From: Junio C Hamano @ 2012-09-27 19:57 UTC (permalink / raw)
  To: Jeff King; +Cc: Ramkumar Ramachandra, Git List, David Aguilar, Anurag Priyam

Jeff King <peff@peff.net> writes:

> Also, have you considered using a config include? Like:
>
>   $ echo '[include]path = ~/my-dotfiles/gitconfig' >~/.gitconfig

Very good suggestion.

> ... you have to bootstrap
> somehow (e.g., you're going to have to copy a .profile or similar to get
> the GIT_GLOBAL_CONFIG variable set).

Exactly my thought ;-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig
  2012-09-27 17:35       ` Jeff King
  2012-09-27 19:57         ` Junio C Hamano
@ 2012-09-27 20:51         ` Matthieu Moy
  2012-09-28  7:05         ` Ramkumar Ramachandra
  2 siblings, 0 replies; 14+ messages in thread
From: Matthieu Moy @ 2012-09-27 20:51 UTC (permalink / raw)
  To: Jeff King
  Cc: Ramkumar Ramachandra, Git List, David Aguilar, Anurag Priyam,
	Junio C Hamano

Jeff King <peff@peff.net> writes:

> Also, have you considered using a config include? Like:
>
>   $ echo '[include]path = ~/my-dotfiles/gitconfig' >~/.gitconfig
>
> It's a one-time setup, and then you get updates inside my-dotfiles
> forever. The one-time setup is annoying, but you have to bootstrap
> somehow (e.g., you're going to have to copy a .profile or similar to get
> the GIT_GLOBAL_CONFIG variable set).

I also strongly prefer symlinks or include over environment variables.
Relying on environment variables makes the setup a bit fragile, partly
because I often mess things up with my shell (e.g. I once had different
shell and environment variables in ~/.xsession and in actual shells,
hence different configuration depending on whether I launch stuff from
my window-manager or from a shell).

I could understand using environment variables for one-shot
configuration change (e.g. HOME=/tmp/ git whatever), but then $HOME is
sufficient in general.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig
  2012-09-27 17:35       ` Jeff King
  2012-09-27 19:57         ` Junio C Hamano
  2012-09-27 20:51         ` Matthieu Moy
@ 2012-09-28  7:05         ` Ramkumar Ramachandra
  2 siblings, 0 replies; 14+ messages in thread
From: Ramkumar Ramachandra @ 2012-09-28  7:05 UTC (permalink / raw)
  To: Jeff King; +Cc: Git List, David Aguilar, Anurag Priyam, Junio C Hamano

Jeff King wrote:
> Like the other reviews, I am not overly enthused. If we are going to add
> a new variable, I think $GIT_HOME makes a lot more sense. But it really
> sounds like using $XDG_CONFIG_HOME would be even simpler.
>
> Also, have you considered using a config include? Like:
>
>   $ echo '[include]path = ~/my-dotfiles/gitconfig' >~/.gitconfig

Sounds like this is the way to go.  Or I could pick up Junio's
suggestion to use a Makefile.  I'll discontinue working on the patch.

Thanks.

Ram

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-09-28  7:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26 14:14 Configuring the location of ~/.gitconfig Ramkumar Ramachandra
2012-09-26 18:34 ` David Aguilar
2012-09-27  6:49   ` Ramkumar Ramachandra
2012-09-27 14:46     ` [PATCH] config: introduce GIT_GLOBAL_CONFIG to override ~/.gitconfig Ramkumar Ramachandra
2012-09-27 16:57       ` Matthieu Moy
2012-09-27 17:50         ` Junio C Hamano
2012-09-27 17:27       ` Junio C Hamano
2012-09-27 17:35       ` Jeff King
2012-09-27 19:57         ` Junio C Hamano
2012-09-27 20:51         ` Matthieu Moy
2012-09-28  7:05         ` Ramkumar Ramachandra
2012-09-27  6:09 ` Configuring the location of ~/.gitconfig Junio C Hamano
2012-09-27  6:40   ` Anurag Priyam
2012-09-27 17:16     ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).