{"thread":{"id":"9278","subject":"[PATCH] Add a --user option to git-config","startedAt":"2007-07-28T16:35:13Z","lastAt":"2007-08-02T19:44:13Z","messageCount":7,"participants":["Ramsay Jones","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"48915","messageId":"46AB7041.8070605@ramsay1.demon.co.uk","threadId":"9278","inReplyTo":null,"subject":"[PATCH] Add a --user option to git-config","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2007-07-28T16:35:13Z","receivedAt":"2007-07-28T16:35:13Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nAt present, the --global option is something of a misnomer, so\nwe introduce the --user option as a synonym, with the intention\nof removing the old option in the future.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nI have recently had the need to create a ~/.gitconfig file for the\nfirst time and I was reminded of this patch. Maybe it's just me who\nthinks that --global is odd ... ;-)  Particularly since the system\nconfig file was added.\n\nActually my config editor of choice is vim, so this is not a high\npriority for me.\n\n[This is against 1.5.2, but will hopefully not be too difficult to\nforward to current git]\n\nATB,\n\nRamsay Jones\n\n Documentation/git-config.txt           |   30 +++++++++++++++---------------\n Documentation/git-repo-config.txt      |    2 +-\n Documentation/tutorial.txt             |    4 ++--\n Documentation/user-manual.txt          |    2 +-\n builtin-config.c                       |    5 +++--\n contrib/completion/git-completion.bash |    2 +-\n ident.c                                |    2 +-\n 7 files changed, 24 insertions(+), 23 deletions(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 280ef20..26138c4 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -3,22 +3,22 @@ git-config(1)\n \n NAME\n ----\n-git-config - Get and set repository or global options\n+git-config - Get and set repository, user or system-wide options\n \n \n SYNOPSIS\n --------\n [verse]\n-'git-config' [--system | --global] [type] name [value [value_regex]]\n-'git-config' [--system | --global] [type] --add name value\n-'git-config' [--system | --global] [type] --replace-all name [value [value_regex]]\n-'git-config' [--system | --global] [type] --get name [value_regex]\n-'git-config' [--system | --global] [type] --get-all name [value_regex]\n-'git-config' [--system | --global] [type] --unset name [value_regex]\n-'git-config' [--system | --global] [type] --unset-all name [value_regex]\n-'git-config' [--system | --global] [type] --rename-section old_name new_name\n-'git-config' [--system | --global] [type] --remove-section name\n-'git-config' [--system | --global] -l | --list\n+'git-config' [--system | --user] [type] name [value [value_regex]]\n+'git-config' [--system | --user] [type] --add name value\n+'git-config' [--system | --user] [type] --replace-all name [value [value_regex]]\n+'git-config' [--system | --user] [type] --get name [value_regex]\n+'git-config' [--system | --user] [type] --get-all name [value_regex]\n+'git-config' [--system | --user] [type] --unset name [value_regex]\n+'git-config' [--system | --user] [type] --unset-all name [value_regex]\n+'git-config' [--system | --user] [type] --rename-section old_name new_name\n+'git-config' [--system | --user] [type] --remove-section name\n+'git-config' [--system | --user] -l | --list\n \n DESCRIPTION\n -----------\n@@ -47,7 +47,7 @@ This command will fail if:\n . the section or key is invalid,\n . you try to unset an option which does not exist,\n . you try to unset/set an option for which multiple lines match, or\n-. you use --global option without $HOME being properly set.\n+. you use --user option without $HOME being properly set.\n \n \n OPTIONS\n@@ -73,8 +73,8 @@ OPTIONS\n --get-regexp::\n \tLike --get-all, but interprets the name as a regular expression.\n \n---global::\n-\tUse global ~/.gitconfig file rather than the repository .git/config.\n+--user::\n+\tUse per user ~/.gitconfig file rather than the repository .git/config.\n \n --system::\n \tUse system-wide $(prefix)/etc/gitconfig rather than the repository\n@@ -110,7 +110,7 @@ ENVIRONMENT\n \n GIT_CONFIG::\n \tTake the configuration from the given file instead of .git/config.\n-\tUsing the \"--global\" option forces this to ~/.gitconfig.\n+\tUsing the \"--user\" option forces this to ~/.gitconfig.\n \n GIT_CONFIG_LOCAL::\n \tCurrently the same as $GIT_CONFIG; when Git will support global\ndiff --git a/Documentation/git-repo-config.txt b/Documentation/git-repo-config.txt\nindex 2deba31..8eec3cd 100644\n--- a/Documentation/git-repo-config.txt\n+++ b/Documentation/git-repo-config.txt\n@@ -3,7 +3,7 @@ git-repo-config(1)\n \n NAME\n ----\n-git-repo-config - Get and set repository or global options\n+git-repo-config - Get and set repository, user or system-wide options\n \n \n SYNOPSIS\ndiff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt\nindex f55d408..a401638 100644\n--- a/Documentation/tutorial.txt\n+++ b/Documentation/tutorial.txt\n@@ -20,8 +20,8 @@ public email address before doing any operation.  The easiest\n way to do so is:\n \n ------------------------------------------------\n-$ git config --global user.name \"Your Name Comes Here\"\n-$ git config --global user.email you@yourdomain.example.com\n+$ git config --user user.name \"Your Name Comes Here\"\n+$ git config --user user.email you@yourdomain.example.com\n ------------------------------------------------\n \n \ndiff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt\nindex 52247aa..105e362 100644\n--- a/Documentation/user-manual.txt\n+++ b/Documentation/user-manual.txt\n@@ -1147,7 +1147,7 @@ The file specified by the `core.excludesfile` config directive:::\n \t   more information on configuration options). This config directive\n \t   can be set in the per-repo `.git/config` file, in which case the\n \t   exclude patterns will apply to that repo only. Alternatively, you\n-\t   can set the directive in the global `~/.gitconfig` file to apply\n+\t   can set the directive in the per-user `~/.gitconfig` file to apply\n \t   the exclude pattern to all your git repos. As with the above\n \t   `.git/info/exclude` (and, indeed, with git config directives in\n \t   general), this directive does not follow push/pull/clone, but remain\ndiff --git a/builtin-config.c b/builtin-config.c\nindex b2515f7..1850d9d 100644\n--- a/builtin-config.c\n+++ b/builtin-config.c\n@@ -2,7 +2,7 @@\n #include \"cache.h\"\n \n static const char git_config_set_usage[] =\n-\"git-config [ --global | --system ] [ --bool | --int ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --rename-section old_name new_name | --remove-section name | --list\";\n+\"git-config [ --user | --system ] [ --bool | --int ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --rename-section old_name new_name | --remove-section name | --list\";\n \n static char *key;\n static regex_t *key_regexp;\n@@ -143,7 +143,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)\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], \"--global\")) {\n+\t\telse if (!strcmp(argv[1], \"--user\") ||\n+\t\t\t\t!strcmp(argv[1], \"--global\")) {\n \t\t\tchar *home = getenv(\"HOME\");\n \t\t\tif (home) {\n \t\t\t\tchar *user_config = xstrdup(mkpath(\"%s/.gitconfig\", home));\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 46356e8..cb5a457 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -745,7 +745,7 @@ _git_config ()\n \tcase \"$cur\" in\n \t--*)\n \t\t__gitcomp \"\n-\t\t\t--global --list --replace-all\n+\t\t\t--user --list --replace-all\n \t\t\t--get --get-all --get-regexp\n \t\t\t--add --unset --unset-all\n \t\t\t\"\ndiff --git a/ident.c b/ident.c\nindex 69a04b8..21dca3a 100644\n--- a/ident.c\n+++ b/ident.c\n@@ -182,7 +182,7 @@ static const char *env_hint =\n \"  git config user.name \\\"Your Name\\\"\\n\"\n \"\\n\"\n \"To set the identity in this repository.\\n\"\n-\"Add --global to set your account\\'s default\\n\"\n+\"Add --user to set your account\\'s default\\n\"\n \"\\n\";\n \n const char *fmt_ident(const char *name, const char *email,\n-- \n1.5.2\n"},{"id":"48928","messageId":"Pine.LNX.4.64.0707282103150.14781@racer.site","threadId":"9278","inReplyTo":"46AB7041.8070605@ramsay1.demon.co.uk","subject":"Re: [PATCH] Add a --user option to git-config","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-28T20:04:18Z","receivedAt":"2007-07-28T20:04:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 28 Jul 2007, Ramsay Jones wrote:\n\n> \n> At present, the --global option is something of a misnomer, so\n> we introduce the --user option as a synonym, with the intention\n> of removing the old option in the future.\n\nAck for the intention, except for \"removing the old option in the future\".  \nWe do not need to advertise it, but breaking existing functionality, which \nmight be used by scripts and aliases is bad.\n\nCiao,\nDscho\n"},{"id":"49331","messageId":"46AFAF7D.7010306@ramsay1.demon.co.uk","threadId":"9278","inReplyTo":"Pine.LNX.4.64.0707282103150.14781@racer.site","subject":"Re: [PATCH] Add a --user option to git-config","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2007-07-31T21:54:05Z","receivedAt":"2007-07-31T21:54:05Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Johannes Schindelin wrote:\n> On Sat, 28 Jul 2007, Ramsay Jones wrote:\n> \n>> At present, the --global option is something of a misnomer, so\n>> we introduce the --user option as a synonym, with the intention\n>> of removing the old option in the future.\n> \n> Ack for the intention, except for \"removing the old option in the future\".  \n> We do not need to advertise it, but breaking existing functionality, which \n> might be used by scripts and aliases is bad.\n> \n\nYep, which is why I made it a synonym; git-gui uses the --global option, for\nexample, and I'm confident that other (user) scripts use it too. The \"future\"\nI had in mind was something like 1 year down the road, but it could be longer\n(or forever) if necessary.\n\nRamsay Jones\n"},{"id":"49332","messageId":"Pine.LNX.4.64.0708011913070.14781@racer.site","threadId":"9278","inReplyTo":"46AFAF7D.7010306@ramsay1.demon.co.uk","subject":"Re: [PATCH] Add a --user option to git-config","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-08-01T18:13:35Z","receivedAt":"2007-08-01T18:13:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 31 Jul 2007, Ramsay Jones wrote:\n\n> Johannes Schindelin wrote:\n> > On Sat, 28 Jul 2007, Ramsay Jones wrote:\n> > \n> >> At present, the --global option is something of a misnomer, so\n> >> we introduce the --user option as a synonym, with the intention\n> >> of removing the old option in the future.\n> > \n> > Ack for the intention, except for \"removing the old option in the future\".  \n> > We do not need to advertise it, but breaking existing functionality, which \n> > might be used by scripts and aliases is bad.\n> > \n> \n> Yep, which is why I made it a synonym; git-gui uses the --global option, for\n> example, and I'm confident that other (user) scripts use it too. The \"future\"\n> I had in mind was something like 1 year down the road, but it could be longer\n> (or forever) if necessary.\n\nPlease read my reply as \"I vote against ever removing the --global \noption\".\n\nCiao,\nDscho\n"},{"id":"49335","messageId":"7vzm1b3y3w.fsf@assigned-by-dhcp.cox.net","threadId":"9278","inReplyTo":"Pine.LNX.4.64.0708011913070.14781@racer.site","subject":"Re: [PATCH] Add a --user option to git-config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-01T18:31:47Z","receivedAt":"2007-08-01T18:31:47Z","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>> Yep, which is why I made it a synonym; git-gui uses the\n>> --global option, for example, and I'm confident that other\n>> (user) scripts use it too. The \"future\" I had in mind was\n>> something like 1 year down the road, but it could be longer\n>> (or forever) if necessary.\n>\n> Please read my reply as \"I vote against ever removing the --global \n> option\".\n\nI would say with --system present, I do not see much point\nhaving the new alias --user either.  Get used to it.  It is\nglobal across the repositories you have control over.\n"},{"id":"49451","messageId":"46B21274.5090900@ramsay1.demon.co.uk","threadId":"9278","inReplyTo":"Pine.LNX.4.64.0708011913070.14781@racer.site","subject":"Re: [PATCH] Add a --user option to git-config","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2007-08-02T17:20:52Z","receivedAt":"2007-08-02T17:20:52Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Johannes Schindelin wrote:\n>> Yep, which is why I made it a synonym; git-gui uses the --global option, for\n>> example, and I'm confident that other (user) scripts use it too. The \"future\"\n>> I had in mind was something like 1 year down the road, but it could be longer\n>> (or forever) if necessary.\n> \n> Please read my reply as \"I vote against ever removing the --global \n> option\".\n> \n\nOK.\n\nRamsay Jones\n"},{"id":"49609","messageId":"46B2340D.4080109@ramsay1.demon.co.uk","threadId":"9278","inReplyTo":"7vzm1b3y3w.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add a --user option to git-config","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2007-08-02T19:44:13Z","receivedAt":"2007-08-02T19:44:13Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Junio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n>>> Yep, which is why I made it a synonym; git-gui uses the\n>>> --global option, for example, and I'm confident that other\n>>> (user) scripts use it too. The \"future\" I had in mind was\n>>> something like 1 year down the road, but it could be longer\n>>> (or forever) if necessary.\n>> Please read my reply as \"I vote against ever removing the --global \n>> option\".\n> \n> I would say with --system present, I do not see much point\n> having the new alias --user either.  Get used to it.  It is\n> global across the repositories you have control over.\n> \n\nOK\n\nATB,\n\nRamsay Jones\n"}]}