{"thread":{"id":"4436","subject":"[PATCH 2/2] repo-config: learn the flag \"--no-local\"","startedAt":"2006-06-08T11:31:46Z","lastAt":"2006-06-08T21:23:15Z","messageCount":21,"participants":["Johannes Schindelin","Lukas Sandström","Karl Hasselström","Alex Riesen","Aneesh Kumar K.V","Junio C Hamano","Sean","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"21420","messageId":"Pine.LNX.4.63.0606081331140.11910@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4436","inReplyTo":null,"subject":"[PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-08T11:31:46Z","receivedAt":"2006-06-08T11:31:46Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSince there is a global config now, we need a way to access it\nconveniently. Now you can say\n\n\tgit repo-config --no-local alias.l \"log --stat -M ORIG_HEAD..\"\n\nto set the alias globally (it will be stored in ~/.gitconfig).\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n---\n cache.h       |    1 +\n config.c      |   23 ++++++++++++++++++-----\n repo-config.c |    5 ++++-\n 3 files changed, 23 insertions(+), 6 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex d5d7fe4..14fe5c8 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -348,6 +348,7 @@ extern void packed_object_info_detail(st\n /* Dumb servers support */\n extern int update_server_info(int);\n \n+extern int git_ignore_local_config;\n typedef int (*config_fn_t)(const char *, const char *);\n extern int git_default_config(const char *, const char *);\n extern int git_config_from_file(config_fn_t fn, const char *);\ndiff --git a/config.c b/config.c\nindex 0987943..33f9109 100644\n--- a/config.c\n+++ b/config.c\n@@ -10,6 +10,7 @@ #include <regex.h>\n \n #define MAXNAME (256)\n \n+int git_ignore_local_config = 0;\n static FILE *config_file;\n static const char *config_file_name;\n static int config_linenr;\n@@ -327,7 +328,8 @@ int git_config(config_fn_t fn)\n \t\t\tret = 0;\n \t}\n \n-\tret += git_config_from_file(fn, git_path(\"config\"));\n+\tif (!git_ignore_local_config)\n+\t\tret += git_config_from_file(fn, git_path(\"config\"));\n \treturn ret;\n }\n \n@@ -501,10 +503,20 @@ int git_config_set_multivar(const char* \n \tint i, dot;\n \tint fd = -1, in_fd;\n \tint ret;\n-\tchar* config_filename = strdup(git_path(\"config\"));\n-\tchar* lock_file = strdup(git_path(\"config.lock\"));\n+\tchar *config_filename, *lock_file;\n \tconst char* last_dot = strrchr(key, '.');\n \n+\tif (git_ignore_local_config) {\n+\t\tconst char *home = getenv(\"HOME\");\n+\t\tif (!home)\n+\t\t\tdie(\"No home?\");\n+\t\tconfig_filename = strdup(mkpath(\"%s/.gitconfig\", home));\n+\t\tlock_file = strdup(mkpath(\"%s/.gitconfig.lock\", home));\n+\t} else {\n+\t\tconfig_filename = strdup(git_path(\"config\"));\n+\t\tlock_file = strdup(git_path(\"config.lock\"));\n+\t}\n+\n \t/*\n \t * Since \"key\" actually contains the section name and the real\n \t * key name separated by a dot, we have to know where the dot is.\n@@ -611,8 +623,9 @@ int git_config_set_multivar(const char* \n \t\t * As a side effect, we make sure to transform only a valid\n \t\t * existing config file.\n \t\t */\n-\t\tif (git_config(store_aux)) {\n-\t\t\tfprintf(stderr, \"invalid config file\\n\");\n+\t\tif (git_config_from_file(store_aux, config_filename)) {\n+\t\t\tfprintf(stderr, \"invalid config file: %s\\n\",\n+\t\t\t\t\tconfig_filename);\n \t\t\tfree(store.key);\n \t\t\tif (store.value_regex != NULL) {\n \t\t\t\tregfree(store.value_regex);\ndiff --git a/repo-config.c b/repo-config.c\nindex 59c2bfb..8c0bb20 100644\n--- a/repo-config.c\n+++ b/repo-config.c\n@@ -97,7 +97,8 @@ static int get_value(const char* key_, c\n \n \tif (do_all && global)\n \t\tgit_config_from_file(show_config, global);\n-\tgit_config_from_file(show_config, git_path(\"config\"));\n+\tif (!git_ignore_local_config)\n+\t\tgit_config_from_file(show_config, git_path(\"config\"));\n \tif (!do_all && !seen)\n \t\tgit_config_from_file(show_config, global);\n \n@@ -125,6 +126,8 @@ int main(int argc, const char **argv)\n \t\t\ttype = T_BOOL;\n \t\telse if (!strcmp(argv[1], \"--list\") || !strcmp(argv[1], \"-l\"))\n \t\t\treturn git_config(show_all_config);\n+\t\telse if (!strcmp(argv[1], \"--no-local\"))\n+\t\t\tgit_ignore_local_config = 1;\n \t\telse\n \t\t\tbreak;\n \t\targc--;\n-- \n1.4.0.rc1.g2f47-dirty\n"},{"id":"21421","messageId":"44880BE8.40804@etek.chalmers.se","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606081331140.11910@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Lukas Sandström","fromEmail":"lukass@etek.chalmers.se","sentAt":"2006-06-08T11:37:12Z","receivedAt":"2006-06-08T11:37:12Z","isPatch":true,"sender":{"key":"luksan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/152281?v=4"},"body":"Johannes Schindelin wrote:\n> Since there is a global config now, we need a way to access it\n> conveniently. Now you can say\n> \n> \tgit repo-config --no-local alias.l \"log --stat -M ORIG_HEAD..\"\n> \n> to set the alias globally (it will be stored in ~/.gitconfig).\n> \n\nWouldn't it make more sense to call the flag --global ?\n\n/Lukas\n"},{"id":"21422","messageId":"Pine.LNX.4.63.0606081340230.25911@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4436","inReplyTo":"44880BE8.40804@etek.chalmers.se","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-08T11:41:04Z","receivedAt":"2006-06-08T11:41:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 8 Jun 2006, Lukas Sandström wrote:\n\n> Johannes Schindelin wrote:\n> > Since there is a global config now, we need a way to access it\n> > conveniently. Now you can say\n> > \n> > \tgit repo-config --no-local alias.l \"log --stat -M ORIG_HEAD..\"\n> > \n> > to set the alias globally (it will be stored in ~/.gitconfig).\n> > \n> \n> Wouldn't it make more sense to call the flag --global ?\n\nSure, why not? Other opinions? (I will not add a test case until this is \nresolved! ;-)\n\nCiao,\nDscho\n"},{"id":"21430","messageId":"20060608133747.GA15374@diana.vm.bytemark.co.uk","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606081340230.25911@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2006-06-08T13:37:47Z","receivedAt":"2006-06-08T13:37:47Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2006-06-08 13:41:04 +0200, Johannes Schindelin wrote:\n\n> On Thu, 8 Jun 2006, Lukas Sandström wrote:\n>\n> > Johannes Schindelin wrote:\n> > > Since there is a global config now, we need a way to access it\n> > > conveniently. Now you can say\n> > >\n> > >   git repo-config --no-local alias.l \"log --stat -M ORIG_HEAD..\"\n> > >\n> > > to set the alias globally (it will be stored in ~/.gitconfig).\n> > >\n> >\n> > Wouldn't it make more sense to call the flag --global ?\n>\n> Sure, why not? Other opinions? (I will not add a test case until\n> this is resolved! ;-)\n\nMy vote goes to --no-local, but only if we also get a --no-no-local\nflag with the opposite meaning. Otherwise, I'd prefer --global. :-)\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"21431","messageId":"81b0412b0606080706r3d475daeoa82b9f882b53b647@mail.gmail.com","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606081340230.25911@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-06-08T14:06:17Z","receivedAt":"2006-06-08T14:06:17Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"> >\n> > Wouldn't it make more sense to call the flag --global ?\n>\n> Sure, why not? Other opinions? (I will not add a test case until this is\n> resolved! ;-)\n>\n\n\"--no-gitconfig\" (as \"--norc\" in bash).\n"},{"id":"21436","messageId":"20060608153236.GA8047@satan.machinehead.org","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606081331140.11910@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Aneesh Kumar K.V","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-06-08T15:32:37Z","receivedAt":"2006-06-08T15:32:37Z","isPatch":true,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"On Thu, Jun 08, 2006 at 01:31:46PM +0200, Johannes Schindelin wrote:\n> \n> Since there is a global config now, we need a way to access it\n> conveniently. Now you can say\n> \n> \tgit repo-config --no-local alias.l \"log --stat -M ORIG_HEAD..\"\n> \n> to set the alias globally (it will be stored in ~/.gitconfig).\n> \n\nhow about  making the above \n\n   git config --repo alias.l \"log --stat -M ORIG_HEAD..\"\n\n-aneesh\n"},{"id":"21437","messageId":"20060608153508.GB8047@satan.machinehead.org","threadId":"4436","inReplyTo":"20060608133747.GA15374@diana.vm.bytemark.co.uk","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Aneesh Kumar K.V","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-06-08T15:35:08Z","receivedAt":"2006-06-08T15:35:08Z","isPatch":true,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"On Thu, Jun 08, 2006 at 03:37:47PM +0200, Karl Hasselstr?m wrote:\n> On 2006-06-08 13:41:04 +0200, Johannes Schindelin wrote:\n> \n> My vote goes to --no-local, but only if we also get a --no-no-local\n> flag with the opposite meaning. Otherwise, I'd prefer --global. :-)\n> \n\n\nI guess it makes much sense to rename the command to git-config and say \n\ngit config  alias.l  -> for golbal config \ngit config --repo alias.l -> for repo specific config \n\n-aneesh\n"},{"id":"21438","messageId":"7v1wtzaa26.fsf@assigned-by-dhcp.cox.net","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606081340230.25911@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-08T16:25:53Z","receivedAt":"2006-06-08T16:25:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> Johannes Schindelin wrote:\n> On Thu, 8 Jun 2006, Lukas Sandström wrote:\n>> > Since there is a global config now, we need a way to access it\n>> > conveniently. Now you can say\n>> > \n>> > \tgit repo-config --no-local alias.l \"log --stat -M ORIG_HEAD..\"\n>> > \n>> > to set the alias globally (it will be stored in ~/.gitconfig).\n>> \n>> Wouldn't it make more sense to call the flag --global ?\n>\n> Sure, why not? Other opinions? (I will not add a test case until this is \n> resolved! ;-)\n\nThe wording \"--no-local\" means you are looking at things\nrelative to a particular repository.  I.e. some configuration\nvariables come from repository-local file, and others from\nsomewhere else.  But I do not think that somewhere else is\n\"global\".  We are reading from $HOME, which is different\ndepending on who is interacting with that same repository.  So I\nwould probably call the other one \"--user\" or something if I\nwere force to pick name.\n\nBut as you know, I am horrible at picking names, so please don't\nstop this from coming up with a good name the list can agree\nupon.\n"},{"id":"21439","messageId":"BAYC1-PASMTP04DDBAA584B31A4B0F31DCAE8B0@CEZ.ICE","threadId":"4436","inReplyTo":"7v1wtzaa26.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-06-08T16:36:52Z","receivedAt":"2006-06-08T16:36:52Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Thu, 08 Jun 2006 09:25:53 -0700\nJunio C Hamano <junkio@cox.net> wrote:\n\n\n> The wording \"--no-local\" means you are looking at things\n> relative to a particular repository.  I.e. some configuration\n> variables come from repository-local file, and others from\n> somewhere else.  But I do not think that somewhere else is\n> \"global\".  We are reading from $HOME, which is different\n> depending on who is interacting with that same repository.  So I\n> would probably call the other one \"--user\" or something if I\n> were force to pick name.\n\n--user or --home makes a lot of sense.  Alternatively you could\njust be explicit: --config=~ or --config=/etc/gitconfig where\n/.gitconfig is automatically appended to the path if it ends in\na directory name.\n\nSean\n"},{"id":"21446","messageId":"e69qne$nnl$2@sea.gmane.org","threadId":"4436","inReplyTo":"20060608153508.GB8047@satan.machinehead.org","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-06-08T18:36:34Z","receivedAt":"2006-06-08T18:36:34Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Aneesh Kumar K.V wrote:\n\n> On Thu, Jun 08, 2006 at 03:37:47PM +0200, Karl Hasselstr?m wrote:\n>> On 2006-06-08 13:41:04 +0200, Johannes Schindelin wrote:\n>> \n>> My vote goes to --no-local, but only if we also get a --no-no-local\n>> flag with the opposite meaning. Otherwise, I'd prefer --global. :-)\n>> \n> \n> \n> I guess it makes much sense to rename the command to git-config and say \n> \n> git config  alias.l  -> for golbal config \n> git config --repo alias.l -> for repo specific config \n\nAnd legacy \"git repo-config\" as equivalent of \"git config --repo\", perhaps\nimplemented via alias mechanism (if there woul be system-wide coniguration\nfile, otherwise in skeleton/template).\n\n-- \nJakub Narebski\nWarsaw, Poland\n"},{"id":"21450","messageId":"Pine.LNX.4.63.0606082216070.28323@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4436","inReplyTo":"e69qne$nnl$2@sea.gmane.org","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-08T20:17:46Z","receivedAt":"2006-06-08T20:17:46Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 8 Jun 2006, Jakub Narebski wrote:\n\n> And legacy \"git repo-config\" as equivalent of \"git config --repo\", perhaps\n> implemented via alias mechanism (if there woul be system-wide coniguration\n> file, otherwise in skeleton/template).\n\nWhy use the alias mechanism? I, for one, never install git. So, this \nsolution is rather fragile. But there are better ways: the builtin \nmechanism for one.\n\nCiao,\nDscho\n"},{"id":"21451","messageId":"Pine.LNX.4.63.0606082217580.28323@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4436","inReplyTo":"20060608153236.GA8047@satan.machinehead.org","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-08T20:18:54Z","receivedAt":"2006-06-08T20:18:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 8 Jun 2006, Aneesh Kumar K.V wrote:\n\n> On Thu, Jun 08, 2006 at 01:31:46PM +0200, Johannes Schindelin wrote:\n> > \n> > Since there is a global config now, we need a way to access it\n> > conveniently. Now you can say\n> > \n> > \tgit repo-config --no-local alias.l \"log --stat -M ORIG_HEAD..\"\n> > \n> > to set the alias globally (it will be stored in ~/.gitconfig).\n> > \n> \n> how about  making the above \n> \n>    git config --repo alias.l \"log --stat -M ORIG_HEAD..\"\n\nIMHO it would be a sane thing to make this default. Most config variables \nare repository dependent.\n\nCiao,\nDscho\n"},{"id":"21452","messageId":"Pine.LNX.4.63.0606082222470.28323@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4436","inReplyTo":"BAYC1-PASMTP04DDBAA584B31A4B0F31DCAE8B0@CEZ.ICE","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-08T20:24:31Z","receivedAt":"2006-06-08T20:24:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 8 Jun 2006, Sean wrote:\n\n> On Thu, 08 Jun 2006 09:25:53 -0700\n> Junio C Hamano <junkio@cox.net> wrote:\n> \n> \n> > The wording \"--no-local\" means you are looking at things\n> > relative to a particular repository.  I.e. some configuration\n> > variables come from repository-local file, and others from\n> > somewhere else.  But I do not think that somewhere else is\n> > \"global\".  We are reading from $HOME, which is different\n> > depending on who is interacting with that same repository.  So I\n> > would probably call the other one \"--user\" or something if I\n> > were force to pick name.\n> \n> --user or --home makes a lot of sense.  Alternatively you could\n> just be explicit: --config=~ or --config=/etc/gitconfig where\n> /.gitconfig is automatically appended to the path if it ends in\n> a directory name.\n\nI think --user makes more sense than --home, since it does not matter \n_where_ it is stored, but _when_ it is retreived.\n\nIn the same vein, I do not think it is user friendly to expect the user to \nremember if it was .gitconfig, .git or .gitrc.\n\nCiao,\nDscho\n"},{"id":"21453","messageId":"BAYC1-PASMTP102B1021B943F57F9FB1EEAE8B0@CEZ.ICE","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606082222470.28323@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-06-08T20:30:45Z","receivedAt":"2006-06-08T20:30:45Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Thu, 8 Jun 2006 22:24:31 +0200 (CEST)\nJohannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n\n> I think --user makes more sense than --home, since it does not matter \n> _where_ it is stored, but _when_ it is retreived.\n\n--home seems more natural to me for some reason but I don't feel strongly\nabout it.\n \n> In the same vein, I do not think it is user friendly to expect the user to \n> remember if it was .gitconfig, .git or .gitrc.\n\nSure, was just thinking that this could be used by an administrator to\nmodify _other_ users' configs.. but probably not worth it.\n\nCheers,\nSean\n"},{"id":"21454","messageId":"Pine.LNX.4.63.0606082235020.28405@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4436","inReplyTo":"BAYC1-PASMTP102B1021B943F57F9FB1EEAE8B0@CEZ.ICE","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-08T20:42:17Z","receivedAt":"2006-06-08T20:42:17Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 8 Jun 2006, Sean wrote:\n\n> On Thu, 8 Jun 2006 22:24:31 +0200 (CEST)\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> > I think --user makes more sense than --home, since it does not matter \n> > _where_ it is stored, but _when_ it is retreived.\n> \n> --home seems more natural to me for some reason but I don't feel strongly\n> about it.\n\nI'd like to know how --home tells you when this key is retreived.\n\n> > In the same vein, I do not think it is user friendly to expect the user to \n> > remember if it was .gitconfig, .git or .gitrc.\n> \n> Sure, was just thinking that this could be used by an administrator to\n> modify _other_ users' configs.. but probably not worth it.\n\nThe admin has no business messing around with the users' configuration. \nAnd if she absolutely wants to be a BOFH, she can fire up any editor, or \ncopy .gitconfig to /root/.gitconfig, use git-config, and copy it back, or \ndo what she does all the time: \"su <user>\". But frankly, we should not \nsupport a bad work flow.\n\nBTW it is the same reason I would rather not see /etc/gitconfig: it \nmeddles with an existing configuration. If you want to give defaults, you \ncan use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I \nwould be very surprised if the behaviour of git changed from one day to \nthe other without my changing anything.\n\nCiao,\nDscho\n"},{"id":"21456","messageId":"BAYC1-PASMTP040660E676E00AD1631524AE8B0@CEZ.ICE","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606082235020.28405@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-06-08T20:55:25Z","receivedAt":"2006-06-08T20:55:25Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Thu, 8 Jun 2006 22:42:17 +0200 (CEST)\nJohannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n\n> I'd like to know how --home tells you when this key is retreived.\n\nI honestly don't know.  How does --user tell you when this key is retrieved?\n\n> The admin has no business messing around with the users' configuration. \n> And if she absolutely wants to be a BOFH, she can fire up any editor, or \n> copy .gitconfig to /root/.gitconfig, use git-config, and copy it back, or \n> do what she does all the time: \"su <user>\". But frankly, we should not \n> support a bad work flow.\n> \n> BTW it is the same reason I would rather not see /etc/gitconfig: it \n> meddles with an existing configuration. If you want to give defaults, you \n> can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I \n> would be very surprised if the behaviour of git changed from one day to \n> the other without my changing anything.\n\nThis seems like a rather heavy handed policy for an application to enforce.\nTo my mind, these types of decisions are best left up to administrators; \nobviously we can't guess all the creative ways git will be used beforehand.\n\nSean\n"},{"id":"21455","messageId":"e6a2rt$n6p$1@sea.gmane.org","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606082235020.28405@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-06-08T20:55:29Z","receivedAt":"2006-06-08T20:55:29Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Johannes Schindelin wrote:\n\n> BTW it is the same reason I would rather not see /etc/gitconfig: it \n> meddles with an existing configuration. If you want to give defaults, you \n> can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I \n> would be very surprised if the behaviour of git changed from one day to \n> the other without my changing anything.\n\nI agree wholeheartily. I guess that the 'skeleton' part has yet to be\nwritten...\n\n-- \nJakub Narebski\nWarsaw, Poland\n"},{"id":"21457","messageId":"Pine.LNX.4.63.0606082300390.28654@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4436","inReplyTo":"e6a2rt$n6p$1@sea.gmane.org","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-08T21:03:41Z","receivedAt":"2006-06-08T21:03:41Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 8 Jun 2006, Jakub Narebski wrote:\n\n> Johannes Schindelin wrote:\n> \n> > BTW it is the same reason I would rather not see /etc/gitconfig: it \n> > meddles with an existing configuration. If you want to give defaults, you \n> > can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I \n> > would be very surprised if the behaviour of git changed from one day to \n> > the other without my changing anything.\n> \n> I agree wholeheartily. I guess that the 'skeleton' part has yet to be\n> written...\n\nI don't know what exactly you mean: the skeleton copying part, or the \ndefault .gitconfig?\n\nAs for the skeleton copying part, on the machine I am writing this on, \nthere is a /etc/skel/ directory, which is automatically copied to the \n$HOME of every newly created user.\n\nAs for the default .gitconfig (which you could put into /etc/skel/): if \nthe default behaviour of git is not to your liking, just make a \n$HOME/.gitconfig, and once you are satisfied with it, stick a copy into \n/etc/skel!\n\nCiao,\nDscho\n"},{"id":"21458","messageId":"Pine.LNX.4.63.0606082308010.28722@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4436","inReplyTo":"BAYC1-PASMTP040660E676E00AD1631524AE8B0@CEZ.ICE","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-08T21:10:15Z","receivedAt":"2006-06-08T21:10:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 8 Jun 2006, Sean wrote:\n\n> On Thu, 8 Jun 2006 22:42:17 +0200 (CEST)\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> > I'd like to know how --home tells you when this key is retreived.\n> \n> I honestly don't know.  How does --user tell you when this key is \n> retrieved?\n\nIf I have --user vs. --repo, then I expect the setting to be active for \nthe user vs. the repository, respectively.\n\n> > The admin has no business messing around with the users' configuration. \n> > And if she absolutely wants to be a BOFH, she can fire up any editor, or \n> > copy .gitconfig to /root/.gitconfig, use git-config, and copy it back, or \n> > do what she does all the time: \"su <user>\". But frankly, we should not \n> > support a bad work flow.\n> > \n> > BTW it is the same reason I would rather not see /etc/gitconfig: it \n> > meddles with an existing configuration. If you want to give defaults, you \n> > can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I \n> > would be very surprised if the behaviour of git changed from one day to \n> > the other without my changing anything.\n> \n> This seems like a rather heavy handed policy for an application to enforce.\n> To my mind, these types of decisions are best left up to administrators; \n\nClearly, you have not met the same administrators as I did.\n\n> obviously we can't guess all the creative ways git will be used beforehand.\n\nThat is right, but is it for somebody else to decide the creative way, or \nfor you?\n\nCiao,\nDscho\n"},{"id":"21459","messageId":"e6a41o$qdn$1@sea.gmane.org","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606082300390.28654@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-06-08T21:15:41Z","receivedAt":"2006-06-08T21:15:41Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Johannes Schindelin wrote:\n\n> Hi,\n> \n> On Thu, 8 Jun 2006, Jakub Narebski wrote:\n> \n>> Johannes Schindelin wrote:\n>> \n>> > BTW it is the same reason I would rather not see /etc/gitconfig: it \n>> > meddles with an existing configuration. If you want to give defaults,\nyou \n>> > can use a skeleton for $HOME, and templates for $GIT_DIR. As a user, I \n>> > would be very surprised if the behaviour of git changed from one day to \n>> > the other without my changing anything.\n>> \n>> I agree wholeheartily. I guess that the 'skeleton' part has yet to be\n>> written...\n> \n> I don't know what exactly you mean: the skeleton copying part, or the \n> default .gitconfig?\n\nNo, I mean the default skeleton for .gitconfig/.gitrc in git distribution or\ngit deb/rpm, and install copying it to appropriate drectory (/etc/skel/ if\ninstalled as root, or $HOME if installed as an ordinary user).\n\n-- \nJakub Narebski\nWarsaw, Poland\n"},{"id":"21460","messageId":"BAYC1-PASMTP0920A286F2CC0660B6FDF1AE8B0@CEZ.ICE","threadId":"4436","inReplyTo":"Pine.LNX.4.63.0606082308010.28722@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 2/2] repo-config: learn the flag \"--no-local\"","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-06-08T21:23:15Z","receivedAt":"2006-06-08T21:23:15Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Thu, 8 Jun 2006 23:10:15 +0200 (CEST)\nJohannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n\n> If I have --user vs. --repo, then I expect the setting to be active for \n> the user vs. the repository, respectively.\n\n*shrug*  This seems exactly the same for --home; like I said I don't\ncare enough to argue about it though.\n\n> Clearly, you have not met the same administrators as I did.\n\nMaybe not.\n \n> > obviously we can't guess all the creative ways git will be used beforehand.\n> \n> That is right, but is it for somebody else to decide the creative way, or \n> for you?\n\nMy argument was that we should not build in policies that assume administrators\nare incompetent.  That we should put the tools in their hands and not restrict\nthem.  That lets them be as creative as they want and not constrained because\nwe have a preexisting opinion about their abilities or an opinion about the\npolicies they should follow with regard to their users files etc.\n\nAnyway, i'm bowing out of this discussion because i'm sure you'll decide\na reasonable course of action.\n\nCheers,\nSean\n"}]}