{"thread":{"id":"30417","subject":"[PATCH] Update Documentation/git-config to reflect --local option.","startedAt":"2012-05-03T22:44:21Z","lastAt":"2012-05-05T10:03:52Z","messageCount":4,"participants":["Florian Achleitner","Junio C Hamano","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"190702","messageId":"1754870.q6d2rgDqBT@flobuntu","threadId":"30417","inReplyTo":null,"subject":"[PATCH] Update Documentation/git-config to reflect --local option.","fromName":"Florian Achleitner","fromEmail":"florian.achleitner2.6.31@gmail.com","sentAt":"2012-05-03T22:44:21Z","receivedAt":"2012-05-03T22:44:21Z","isPatch":true,"sender":{"key":"florian.achleitner.2.6.31@gmail.com","avatar":"https://avatars.githubusercontent.com/u/880777?v=4"},"body":"Describe config file selection in git-config.\nWhile the usage message of git-config shows --local,\nthe documentation page did not contain anything about that.\n\nSigned-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>\n---\nThis was pointed out in http://thread.gmane.org/gmane.comp.version-\ncontrol.git/196326\n\n Documentation/git-config.txt |    7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 81b0398..bda8bbb 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -44,10 +44,13 @@ a \"true\" or \"false\" string for bool), or '--path', which \ndoes some\n path expansion (see '--path' below).  If no type specifier is passed, no\n checks or transformations are performed on the value.\n \n-The file-option can be one of '--system', '--global' or '--file'\n+The file-option can be one of '--system', '--global', '--local', or '--file'\n which specify where the values will be read from or written to.\n The default is to assume the config file of the current repository,\n-.git/config unless defined otherwise with GIT_DIR and GIT_CONFIG\n+.git/config unless defined otherwise with GIT_DIR and GIT_CONFIG.\n+For read commands like '--get' the default is to search local, global, and\n+system config files (in this order) for the requested value and stop after\n+the first finding.\n (see <<FILES>>).\n \n This command will fail (with exit code ret) if:\n-- \n1.7.9.5\n"},{"id":"190708","messageId":"7vr4v0deyg.fsf@alter.siamese.dyndns.org","threadId":"30417","inReplyTo":"1754870.q6d2rgDqBT@flobuntu","subject":"Re: [PATCH] Update Documentation/git-config to reflect --local option.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-03T23:25:59Z","receivedAt":"2012-05-03T23:25:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Florian Achleitner <florian.achleitner2.6.31@gmail.com> writes:\n\n> Describe config file selection in git-config.\n> While the usage message of git-config shows --local,\n> the documentation page did not contain anything about that.\n>\n> Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>\n> ---\n> This was pointed out in http://thread.gmane.org/gmane.comp.version-\n> control.git/196326\n\nHrm, does the updated text explain the usefulness of the option clearly\nenough?\n\nPeff> Original motivation is here:\nPeff> http://thread.gmane.org/gmane.comp.version-control.git/152524\n\n> +The file-option can be one of '--system', '--global', '--local', or '--file'\n>  which specify where the values will be read from or written to.\n>  The default is to assume the config file of the current repository,\n> +.git/config unless defined otherwise with GIT_DIR and GIT_CONFIG.\n> +For read commands like '--get' the default is to search local, global, and\n> +system config files (in this order) for the requested value and stop after\n> +the first finding.\n\nIt may be just me, but I find the untouched \"The default is to assume\"\nline somewhat out of place after this update.  When reading, without any\nof the options, we read all three places and consolidate them (stopping\nafter the first file that has the definition is a funny exception that\n\"--get\" does; in general the internals read all of them so \"--get-all\"\noutput is a better way to understand what you wrote in your configuration\nfiles), and when writing, without any of the options, we write to the\ncurrent configuration file.\n\nThe paragraph should first be restructured to describe read and write\ncases separately, and then '--local' should be described, perhaps like\nthis?\n\n\tWhen reading, the values are read from the system, global and\n\trepository local configuration files by default, and options\n\t'--system', '--global', '--local' and '--file <filename>' can be\n\tused to tell the command to read from only that location.\n\n\tWhen writing, the new value is written to the repository local\n\tconfiguration file by default, and options '--system', '--global',\n\t'--file <filename>' can be used to tell the command to write to\n\tthat location (you can say '--local' but that is the default).\n"},{"id":"190714","messageId":"20120504032400.GB2589@burratino","threadId":"30417","inReplyTo":"7vr4v0deyg.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Update Documentation/git-config to reflect --local option.","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-05-04T03:26:35Z","receivedAt":"2012-05-04T03:26:35Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"(adding Jeff to cc)\nHi Florian and Junio,\n\nJunio C Hamano wrote:\n\n> The paragraph should first be restructured to describe read and write\n> cases separately, and then '--local' should be described, perhaps like\n> this?\n\nThanks --- that makes a lot of sense to me.\n\nFlorian, would you be interested in another go?  The usual convention\nin cases like this is to start the subject line with something like\n\"[PATCH v2]\" so it is clear which version of the patch is supposed to\nbe better than the other.\n\nHope that helps,\nJonathan\n"},{"id":"190832","messageId":"4557278.eakEfj5iWL@flomedio","threadId":"30417","inReplyTo":"20120504032400.GB2589@burratino","subject":"[PATCH v2] Update Documentation/git-config to reflect --local option.","fromName":"Florian Achleitner","fromEmail":"florian.achleitner2.6.31@gmail.com","sentAt":"2012-05-05T10:03:52Z","receivedAt":"2012-05-05T10:03:52Z","isPatch":true,"sender":{"key":"florian.achleitner.2.6.31@gmail.com","avatar":"https://avatars.githubusercontent.com/u/880777?v=4"},"body":"Describe config file selection in git-config.\nWhile the usage message of git-config shows --local,\nthe documentation page did not contain anything about that.\n\nSigned-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>\n---\nUpdated with the formulation suggested by Junio.\n\n Documentation/git-config.txt |   14 +++++++++-----\n 1 file changed, 9 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 81b0398..3f5d216 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -44,11 +44,15 @@ a \"true\" or \"false\" string for bool), or '--path', which does some\n path expansion (see '--path' below).  If no type specifier is passed, no\n checks or transformations are performed on the value.\n \n-The file-option can be one of '--system', '--global' or '--file'\n-which specify where the values will be read from or written to.\n-The default is to assume the config file of the current repository,\n-.git/config unless defined otherwise with GIT_DIR and GIT_CONFIG\n-(see <<FILES>>).\n+When reading, the values are read from the system, global and\n+repository local configuration files by default, and options\n+'--system', '--global', '--local' and '--file <filename>' can be\n+used to tell the command to read from only that location (see <<FILES>>).\n+\n+When writing, the new value is written to the repository local\n+configuration file by default, and options '--system', '--global',\n+'--file <filename>' can be used to tell the command to write to\n+that location (you can say '--local' but that is the default).\n \n This command will fail (with exit code ret) if:\n \n-- \n1.7.9.5\n"}]}