# [PATCH 2/2] repo-config: learn the flag "--no-local"

21 messages from 2006-06-08 to 2006-06-08. Participants: Johannes Schindelin, Lukas Sandström, Karl Hasselström, Alex Riesen, Aneesh Kumar K.V, Junio C Hamano, Sean, Jakub Narebski.
Thread: https://gitlist.dev/t/4436

## Johannes Schindelin, 2006-06-08 11:31

Subject: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <Pine.LNX.4.63.0606081331140.11910@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0606081331140.11910%40wbgn013.biozentrum.uni-wuerzburg.de

```

Since there is a global config now, we need a way to access it
conveniently. Now you can say

	git repo-config --no-local alias.l "log --stat -M ORIG_HEAD.."

to set the alias globally (it will be stored in ~/.gitconfig).

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 cache.h       |    1 +
 config.c      |   23 ++++++++++++++++++-----
 repo-config.c |    5 ++++-
 3 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/cache.h b/cache.h
index d5d7fe4..14fe5c8 100644
--- a/cache.h
+++ b/cache.h
@@ -348,6 +348,7 @@ extern void packed_object_info_detail(st
 /* Dumb servers support */
 extern int update_server_info(int);
 
+extern int git_ignore_local_config;
 typedef int (*config_fn_t)(const char *, const char *);
 extern int git_default_config(const char *, const char *);
 extern int git_config_from_file(config_fn_t fn, const char *);
diff --git a/config.c b/config.c
index 0987943..33f9109 100644
--- a/config.c
+++ b/config.c
@@ -10,6 +10,7 @@ #include <regex.h>
 
 #define MAXNAME (256)
 
+int git_ignore_local_config = 0;
 static FILE *config_file;
 static const char *config_file_name;
 static int config_linenr;
@@ -327,7 +328,8 @@ int git_config(config_fn_t fn)
 			ret = 0;
 	}
 
-	ret += git_config_from_file(fn, git_path("config"));
+	if (!git_ignore_local_config)
+		ret += git_config_from_file(fn, git_path("config"));
 	return ret;
 }
 
@@ -501,10 +503,20 @@ int git_config_set_multivar(const char* 
 	int i, dot;
 	int fd = -1, in_fd;
 	int ret;
-	char* config_filename = strdup(git_path("config"));
-	char* lock_file = strdup(git_path("config.lock"));
+	char *config_filename, *lock_file;
 	const char* last_dot = strrchr(key, '.');
 
+	if (git_ignore_local_config) {
+		const char *home = getenv("HOME");
+		if (!home)
+			die("No home?");
+		config_filename = strdup(mkpath("%s/.gitconfig", home));
+		lock_file = strdup(mkpath("%s/.gitconfig.lock", home));
+	} else {
+		config_filename = strdup(git_path("config"));
+		lock_file = strdup(git_path("config.lock"));
+	}
+
 	/*
 	 * Since "key" actually contains the section name and the real
 	 * key name separated by a dot, we have to know where the dot is.
@@ -611,8 +623,9 @@ int git_config_set_multivar(const char* 
 		 * As a side effect, we make sure to transform only a valid
 		 * existing config file.
 		 */
-		if (git_config(store_aux)) {
-			fprintf(stderr, "invalid config file\n");
+		if (git_config_from_file(store_aux, config_filename)) {
+			fprintf(stderr, "invalid config file: %s\n",
+					config_filename);
 			free(store.key);
 			if (store.value_regex != NULL) {
 				regfree(store.value_regex);
diff --git a/repo-config.c b/repo-config.c
index 59c2bfb..8c0bb20 100644
--- a/repo-config.c
+++ b/repo-config.c
@@ -97,7 +97,8 @@ static int get_value(const char* key_, c
 
 	if (do_all && global)
 		git_config_from_file(show_config, global);
-	git_config_from_file(show_config, git_path("config"));
+	if (!git_ignore_local_config)
+		git_config_from_file(show_config, git_path("config"));
 	if (!do_all && !seen)
 		git_config_from_file(show_config, global);
 
@@ -125,6 +126,8 @@ int main(int argc, const char **argv)
 			type = T_BOOL;
 		else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l"))
 			return git_config(show_all_config);
+		else if (!strcmp(argv[1], "--no-local"))
+			git_ignore_local_config = 1;
 		else
 			break;
 		argc--;
-- 
1.4.0.rc1.g2f47-dirty

```

## Lukas Sandström, 2006-06-08 11:37

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <44880BE8.40804@etek.chalmers.se>
URL: https://gitlist.dev/e/44880BE8.40804%40etek.chalmers.se
In-Reply-To: <Pine.LNX.4.63.0606081331140.11910@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin wrote:
> Since there is a global config now, we need a way to access it
> conveniently. Now you can say
> 
> 	git repo-config --no-local alias.l "log --stat -M ORIG_HEAD.."
> 
> to set the alias globally (it will be stored in ~/.gitconfig).
> 

Wouldn't it make more sense to call the flag --global ?

/Lukas

```

## Johannes Schindelin, 2006-06-08 11:41

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <Pine.LNX.4.63.0606081340230.25911@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0606081340230.25911%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <44880BE8.40804@etek.chalmers.se>

```
Hi,

On Thu, 8 Jun 2006, Lukas Sandström wrote:

> Johannes Schindelin wrote:
> > Since there is a global config now, we need a way to access it
> > conveniently. Now you can say
> > 
> > 	git repo-config --no-local alias.l "log --stat -M ORIG_HEAD.."
> > 
> > to set the alias globally (it will be stored in ~/.gitconfig).
> > 
> 
> Wouldn't it make more sense to call the flag --global ?

Sure, why not? Other opinions? (I will not add a test case until this is 
resolved! ;-)

Ciao,
Dscho

```

## Karl Hasselström, 2006-06-08 13:37

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <20060608133747.GA15374@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20060608133747.GA15374%40diana.vm.bytemark.co.uk
In-Reply-To: <Pine.LNX.4.63.0606081340230.25911@wbgn013.biozentrum.uni-wuerzburg.de>

```
On 2006-06-08 13:41:04 +0200, Johannes Schindelin wrote:

> On Thu, 8 Jun 2006, Lukas Sandström wrote:
>
> > Johannes Schindelin wrote:
> > > Since there is a global config now, we need a way to access it
> > > conveniently. Now you can say
> > >
> > >   git repo-config --no-local alias.l "log --stat -M ORIG_HEAD.."
> > >
> > > to set the alias globally (it will be stored in ~/.gitconfig).
> > >
> >
> > Wouldn't it make more sense to call the flag --global ?
>
> Sure, why not? Other opinions? (I will not add a test case until
> this is resolved! ;-)

My vote goes to --no-local, but only if we also get a --no-no-local
flag with the opposite meaning. Otherwise, I'd prefer --global. :-)

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

```

## Alex Riesen, 2006-06-08 14:06

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <81b0412b0606080706r3d475daeoa82b9f882b53b647@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0606080706r3d475daeoa82b9f882b53b647%40mail.gmail.com
In-Reply-To: <Pine.LNX.4.63.0606081340230.25911@wbgn013.biozentrum.uni-wuerzburg.de>

```
> >
> > Wouldn't it make more sense to call the flag --global ?
>
> Sure, why not? Other opinions? (I will not add a test case until this is
> resolved! ;-)
>

"--no-gitconfig" (as "--norc" in bash).

```

## Aneesh Kumar K.V, 2006-06-08 15:32

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <20060608153236.GA8047@satan.machinehead.org>
URL: https://gitlist.dev/e/20060608153236.GA8047%40satan.machinehead.org
In-Reply-To: <Pine.LNX.4.63.0606081331140.11910@wbgn013.biozentrum.uni-wuerzburg.de>

```
On Thu, Jun 08, 2006 at 01:31:46PM +0200, Johannes Schindelin wrote:
> 
> Since there is a global config now, we need a way to access it
> conveniently. Now you can say
> 
> 	git repo-config --no-local alias.l "log --stat -M ORIG_HEAD.."
> 
> to set the alias globally (it will be stored in ~/.gitconfig).
> 

how about  making the above 

   git config --repo alias.l "log --stat -M ORIG_HEAD.."

-aneesh

```

## Aneesh Kumar K.V, 2006-06-08 15:35

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <20060608153508.GB8047@satan.machinehead.org>
URL: https://gitlist.dev/e/20060608153508.GB8047%40satan.machinehead.org
In-Reply-To: <20060608133747.GA15374@diana.vm.bytemark.co.uk>

```
On Thu, Jun 08, 2006 at 03:37:47PM +0200, Karl Hasselstr?m wrote:
> On 2006-06-08 13:41:04 +0200, Johannes Schindelin wrote:
> 
> My vote goes to --no-local, but only if we also get a --no-no-local
> flag with the opposite meaning. Otherwise, I'd prefer --global. :-)
> 


I guess it makes much sense to rename the command to git-config and say 

git config  alias.l  -> for golbal config 
git config --repo alias.l -> for repo specific config 

-aneesh

```

## Junio C Hamano, 2006-06-08 16:25

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <7v1wtzaa26.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v1wtzaa26.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.63.0606081340230.25911@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

>> Johannes Schindelin wrote:
> On Thu, 8 Jun 2006, Lukas Sandström wrote:
>> > Since there is a global config now, we need a way to access it
>> > conveniently. Now you can say
>> > 
>> > 	git repo-config --no-local alias.l "log --stat -M ORIG_HEAD.."
>> > 
>> > to set the alias globally (it will be stored in ~/.gitconfig).
>> 
>> Wouldn't it make more sense to call the flag --global ?
>
> Sure, why not? Other opinions? (I will not add a test case until this is 
> resolved! ;-)

The wording "--no-local" means you are looking at things
relative to a particular repository.  I.e. some configuration
variables come from repository-local file, and others from
somewhere else.  But I do not think that somewhere else is
"global".  We are reading from $HOME, which is different
depending on who is interacting with that same repository.  So I
would probably call the other one "--user" or something if I
were force to pick name.

But as you know, I am horrible at picking names, so please don't
stop this from coming up with a good name the list can agree
upon.

```

## Sean, 2006-06-08 16:36

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <BAYC1-PASMTP04DDBAA584B31A4B0F31DCAE8B0@CEZ.ICE>
URL: https://gitlist.dev/e/BAYC1-PASMTP04DDBAA584B31A4B0F31DCAE8B0%40CEZ.ICE
In-Reply-To: <7v1wtzaa26.fsf@assigned-by-dhcp.cox.net>

```
On Thu, 08 Jun 2006 09:25:53 -0700
Junio C Hamano <junkio@cox.net> wrote:


> The wording "--no-local" means you are looking at things
> relative to a particular repository.  I.e. some configuration
> variables come from repository-local file, and others from
> somewhere else.  But I do not think that somewhere else is
> "global".  We are reading from $HOME, which is different
> depending on who is interacting with that same repository.  So I
> would probably call the other one "--user" or something if I
> were force to pick name.

--user or --home makes a lot of sense.  Alternatively you could
just be explicit: --config=~ or --config=/etc/gitconfig where
/.gitconfig is automatically appended to the path if it ends in
a directory name.

Sean

```

## Jakub Narebski, 2006-06-08 18:36

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <e69qne$nnl$2@sea.gmane.org>
URL: https://gitlist.dev/e/e69qne%24nnl%242%40sea.gmane.org
In-Reply-To: <20060608153508.GB8047@satan.machinehead.org>

```
Aneesh Kumar K.V wrote:

> On Thu, Jun 08, 2006 at 03:37:47PM +0200, Karl Hasselstr?m wrote:
>> On 2006-06-08 13:41:04 +0200, Johannes Schindelin wrote:
>> 
>> My vote goes to --no-local, but only if we also get a --no-no-local
>> flag with the opposite meaning. Otherwise, I'd prefer --global. :-)
>> 
> 
> 
> I guess it makes much sense to rename the command to git-config and say 
> 
> git config  alias.l  -> for golbal config 
> git config --repo alias.l -> for repo specific config 

And legacy "git repo-config" as equivalent of "git config --repo", perhaps
implemented via alias mechanism (if there woul be system-wide coniguration
file, otherwise in skeleton/template).

-- 
Jakub Narebski
Warsaw, Poland

```

## Johannes Schindelin, 2006-06-08 20:17

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <Pine.LNX.4.63.0606082216070.28323@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0606082216070.28323%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <e69qne$nnl$2@sea.gmane.org>

```
Hi,

On Thu, 8 Jun 2006, Jakub Narebski wrote:

> And legacy "git repo-config" as equivalent of "git config --repo", perhaps
> implemented via alias mechanism (if there woul be system-wide coniguration
> file, otherwise in skeleton/template).

Why use the alias mechanism? I, for one, never install git. So, this 
solution is rather fragile. But there are better ways: the builtin 
mechanism for one.

Ciao,
Dscho

```

## Johannes Schindelin, 2006-06-08 20:18

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <Pine.LNX.4.63.0606082217580.28323@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0606082217580.28323%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <20060608153236.GA8047@satan.machinehead.org>

```
Hi,

On Thu, 8 Jun 2006, Aneesh Kumar K.V wrote:

> On Thu, Jun 08, 2006 at 01:31:46PM +0200, Johannes Schindelin wrote:
> > 
> > Since there is a global config now, we need a way to access it
> > conveniently. Now you can say
> > 
> > 	git repo-config --no-local alias.l "log --stat -M ORIG_HEAD.."
> > 
> > to set the alias globally (it will be stored in ~/.gitconfig).
> > 
> 
> how about  making the above 
> 
>    git config --repo alias.l "log --stat -M ORIG_HEAD.."

IMHO it would be a sane thing to make this default. Most config variables 
are repository dependent.

Ciao,
Dscho

```

## Johannes Schindelin, 2006-06-08 20:24

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <Pine.LNX.4.63.0606082222470.28323@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0606082222470.28323%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <BAYC1-PASMTP04DDBAA584B31A4B0F31DCAE8B0@CEZ.ICE>

```
Hi,

On Thu, 8 Jun 2006, Sean wrote:

> On Thu, 08 Jun 2006 09:25:53 -0700
> Junio C Hamano <junkio@cox.net> wrote:
> 
> 
> > The wording "--no-local" means you are looking at things
> > relative to a particular repository.  I.e. some configuration
> > variables come from repository-local file, and others from
> > somewhere else.  But I do not think that somewhere else is
> > "global".  We are reading from $HOME, which is different
> > depending on who is interacting with that same repository.  So I
> > would probably call the other one "--user" or something if I
> > were force to pick name.
> 
> --user or --home makes a lot of sense.  Alternatively you could
> just be explicit: --config=~ or --config=/etc/gitconfig where
> /.gitconfig is automatically appended to the path if it ends in
> a directory name.

I think --user makes more sense than --home, since it does not matter 
_where_ it is stored, but _when_ it is retreived.

In the same vein, I do not think it is user friendly to expect the user to 
remember if it was .gitconfig, .git or .gitrc.

Ciao,
Dscho

```

## Sean, 2006-06-08 20:30

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <BAYC1-PASMTP102B1021B943F57F9FB1EEAE8B0@CEZ.ICE>
URL: https://gitlist.dev/e/BAYC1-PASMTP102B1021B943F57F9FB1EEAE8B0%40CEZ.ICE
In-Reply-To: <Pine.LNX.4.63.0606082222470.28323@wbgn013.biozentrum.uni-wuerzburg.de>

```
On Thu, 8 Jun 2006 22:24:31 +0200 (CEST)
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

> I think --user makes more sense than --home, since it does not matter 
> _where_ it is stored, but _when_ it is retreived.

--home seems more natural to me for some reason but I don't feel strongly
about it.
 
> In the same vein, I do not think it is user friendly to expect the user to 
> remember if it was .gitconfig, .git or .gitrc.

Sure, was just thinking that this could be used by an administrator to
modify _other_ users' configs.. but probably not worth it.

Cheers,
Sean

```

## Johannes Schindelin, 2006-06-08 20:42

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <Pine.LNX.4.63.0606082235020.28405@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0606082235020.28405%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <BAYC1-PASMTP102B1021B943F57F9FB1EEAE8B0@CEZ.ICE>

```
Hi,

On Thu, 8 Jun 2006, Sean wrote:

> On Thu, 8 Jun 2006 22:24:31 +0200 (CEST)
> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> 
> > I think --user makes more sense than --home, since it does not matter 
> > _where_ it is stored, but _when_ it is retreived.
> 
> --home seems more natural to me for some reason but I don't feel strongly
> about it.

I'd like to know how --home tells you when this key is retreived.

> > In the same vein, I do not think it is user friendly to expect the user to 
> > remember if it was .gitconfig, .git or .gitrc.
> 
> Sure, was just thinking that this could be used by an administrator to
> modify _other_ users' configs.. but probably not worth it.

The admin has no business messing around with the users' configuration. 
And if she absolutely wants to be a BOFH, she can fire up any editor, or 
copy .gitconfig to /root/.gitconfig, use git-config, and copy it back, or 
do what she does all the time: "su <user>". But frankly, we should not 
support a bad work flow.

BTW it is the same reason I would rather not see /etc/gitconfig: it 
meddles with an existing configuration. If you want to give defaults, you 
can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I 
would be very surprised if the behaviour of git changed from one day to 
the other without my changing anything.

Ciao,
Dscho

```

## Sean, 2006-06-08 20:55

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <BAYC1-PASMTP040660E676E00AD1631524AE8B0@CEZ.ICE>
URL: https://gitlist.dev/e/BAYC1-PASMTP040660E676E00AD1631524AE8B0%40CEZ.ICE
In-Reply-To: <Pine.LNX.4.63.0606082235020.28405@wbgn013.biozentrum.uni-wuerzburg.de>

```
On Thu, 8 Jun 2006 22:42:17 +0200 (CEST)
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

> I'd like to know how --home tells you when this key is retreived.

I honestly don't know.  How does --user tell you when this key is retrieved?

> The admin has no business messing around with the users' configuration. 
> And if she absolutely wants to be a BOFH, she can fire up any editor, or 
> copy .gitconfig to /root/.gitconfig, use git-config, and copy it back, or 
> do what she does all the time: "su <user>". But frankly, we should not 
> support a bad work flow.
> 
> BTW it is the same reason I would rather not see /etc/gitconfig: it 
> meddles with an existing configuration. If you want to give defaults, you 
> can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I 
> would be very surprised if the behaviour of git changed from one day to 
> the other without my changing anything.

This seems like a rather heavy handed policy for an application to enforce.
To my mind, these types of decisions are best left up to administrators; 
obviously we can't guess all the creative ways git will be used beforehand.

Sean

```

## Jakub Narebski, 2006-06-08 20:55

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <e6a2rt$n6p$1@sea.gmane.org>
URL: https://gitlist.dev/e/e6a2rt%24n6p%241%40sea.gmane.org
In-Reply-To: <Pine.LNX.4.63.0606082235020.28405@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin wrote:

> BTW it is the same reason I would rather not see /etc/gitconfig: it 
> meddles with an existing configuration. If you want to give defaults, you 
> can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I 
> would be very surprised if the behaviour of git changed from one day to 
> the other without my changing anything.

I agree wholeheartily. I guess that the 'skeleton' part has yet to be
written...

-- 
Jakub Narebski
Warsaw, Poland

```

## Johannes Schindelin, 2006-06-08 21:03

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <Pine.LNX.4.63.0606082300390.28654@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0606082300390.28654%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <e6a2rt$n6p$1@sea.gmane.org>

```
Hi,

On Thu, 8 Jun 2006, Jakub Narebski wrote:

> Johannes Schindelin wrote:
> 
> > BTW it is the same reason I would rather not see /etc/gitconfig: it 
> > meddles with an existing configuration. If you want to give defaults, you 
> > can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I 
> > would be very surprised if the behaviour of git changed from one day to 
> > the other without my changing anything.
> 
> I agree wholeheartily. I guess that the 'skeleton' part has yet to be
> written...

I don't know what exactly you mean: the skeleton copying part, or the 
default .gitconfig?

As for the skeleton copying part, on the machine I am writing this on, 
there is a /etc/skel/ directory, which is automatically copied to the 
$HOME of every newly created user.

As for the default .gitconfig (which you could put into /etc/skel/): if 
the default behaviour of git is not to your liking, just make a 
$HOME/.gitconfig, and once you are satisfied with it, stick a copy into 
/etc/skel!

Ciao,
Dscho

```

## Johannes Schindelin, 2006-06-08 21:10

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <Pine.LNX.4.63.0606082308010.28722@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0606082308010.28722%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <BAYC1-PASMTP040660E676E00AD1631524AE8B0@CEZ.ICE>

```
Hi,

On Thu, 8 Jun 2006, Sean wrote:

> On Thu, 8 Jun 2006 22:42:17 +0200 (CEST)
> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> 
> > I'd like to know how --home tells you when this key is retreived.
> 
> I honestly don't know.  How does --user tell you when this key is 
> retrieved?

If I have --user vs. --repo, then I expect the setting to be active for 
the user vs. the repository, respectively.

> > The admin has no business messing around with the users' configuration. 
> > And if she absolutely wants to be a BOFH, she can fire up any editor, or 
> > copy .gitconfig to /root/.gitconfig, use git-config, and copy it back, or 
> > do what she does all the time: "su <user>". But frankly, we should not 
> > support a bad work flow.
> > 
> > BTW it is the same reason I would rather not see /etc/gitconfig: it 
> > meddles with an existing configuration. If you want to give defaults, you 
> > can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I 
> > would be very surprised if the behaviour of git changed from one day to 
> > the other without my changing anything.
> 
> This seems like a rather heavy handed policy for an application to enforce.
> To my mind, these types of decisions are best left up to administrators; 

Clearly, you have not met the same administrators as I did.

> obviously we can't guess all the creative ways git will be used beforehand.

That is right, but is it for somebody else to decide the creative way, or 
for you?

Ciao,
Dscho

```

## Jakub Narebski, 2006-06-08 21:15

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <e6a41o$qdn$1@sea.gmane.org>
URL: https://gitlist.dev/e/e6a41o%24qdn%241%40sea.gmane.org
In-Reply-To: <Pine.LNX.4.63.0606082300390.28654@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin wrote:

> Hi,
> 
> On Thu, 8 Jun 2006, Jakub Narebski wrote:
> 
>> Johannes Schindelin wrote:
>> 
>> > BTW it is the same reason I would rather not see /etc/gitconfig: it 
>> > meddles with an existing configuration. If you want to give defaults,
you 
>> > can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I 
>> > would be very surprised if the behaviour of git changed from one day to 
>> > the other without my changing anything.
>> 
>> I agree wholeheartily. I guess that the 'skeleton' part has yet to be
>> written...
> 
> I don't know what exactly you mean: the skeleton copying part, or the 
> default .gitconfig?

No, I mean the default skeleton for .gitconfig/.gitrc in git distribution or
git deb/rpm, and install copying it to appropriate drectory (/etc/skel/ if
installed as root, or $HOME if installed as an ordinary user).

-- 
Jakub Narebski
Warsaw, Poland

```

## Sean, 2006-06-08 21:23

Subject: Re: [PATCH 2/2] repo-config: learn the flag "--no-local"
Message-ID: <BAYC1-PASMTP0920A286F2CC0660B6FDF1AE8B0@CEZ.ICE>
URL: https://gitlist.dev/e/BAYC1-PASMTP0920A286F2CC0660B6FDF1AE8B0%40CEZ.ICE
In-Reply-To: <Pine.LNX.4.63.0606082308010.28722@wbgn013.biozentrum.uni-wuerzburg.de>

```
On Thu, 8 Jun 2006 23:10:15 +0200 (CEST)
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

> If I have --user vs. --repo, then I expect the setting to be active for 
> the user vs. the repository, respectively.

*shrug*  This seems exactly the same for --home; like I said I don't
care enough to argue about it though.

> Clearly, you have not met the same administrators as I did.

Maybe not.
 
> > obviously we can't guess all the creative ways git will be used beforehand.
> 
> That is right, but is it for somebody else to decide the creative way, or 
> for you?

My argument was that we should not build in policies that assume administrators
are incompetent.  That we should put the tools in their hands and not restrict
them.  That lets them be as creative as they want and not constrained because
we have a preexisting opinion about their abilities or an opinion about the
policies they should follow with regard to their users files etc.

Anyway, i'm bowing out of this discussion because i'm sure you'll decide
a reasonable course of action.

Cheers,
Sean

```
