{"thread":{"id":"8369","subject":"[PATCH] git-config: Improve documentation of git-config file handling","startedAt":"2007-05-31T00:35:36Z","lastAt":"2007-05-31T00:35:37Z","messageCount":2,"participants":["Frank Lichtenheld"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"43670","messageId":"11805717372779-git-send-email-frank@lichtenheld.de","threadId":"8369","inReplyTo":null,"subject":"[PATCH] git-config: Various small fixes to asciidoc documentation","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-05-31T00:35:36Z","receivedAt":"2007-05-31T00:35:36Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Add '' around the only mentioned commandline option that didn't\nhad it.\n\nMake reference to section EXAMPLE a link and rename it to\nEXAMPLES because it actually contains a lot of examples ;)\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-config.txt |   10 ++++++----\n 1 files changed, 6 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 827a499..8f4149f 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -31,7 +31,7 @@ If you want to update or unset an option which can occur on multiple\n lines, a POSIX regexp `value_regex` needs to be given.  Only the\n existing values that match the regexp are updated or unset.  If\n you want to handle the lines that do *not* match the regex, just\n-prepend a single exclamation mark in front (see EXAMPLES).\n+prepend a single exclamation mark in front (see also <<EXAMPLES>>).\n \n The type specifier can be either '--int' or '--bool', which will make\n 'git-config' ensure that the variable(s) are of the given type and\n@@ -48,7 +48,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 '--global' option without $HOME being properly set.\n \n \n OPTIONS\n@@ -119,8 +119,10 @@ GIT_CONFIG_LOCAL::\n \tfrom the global configuration file in addition to the given file.\n \n \n-EXAMPLE\n--------\n+\n+[[EXAMPLES]]\n+EXAMPLES\n+--------\n \n Given a .git/config like this:\n \n-- \n1.5.2-rc3.GIT\n"},{"id":"43669","messageId":"11805717372750-git-send-email-frank@lichtenheld.de","threadId":"8369","inReplyTo":"11805717372779-git-send-email-frank@lichtenheld.de","subject":"[PATCH] git-config: Improve documentation of git-config file handling","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-05-31T00:35:37Z","receivedAt":"2007-05-31T00:35:37Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"The description which files git-config uses and how the various\ncommand line options and environment variables affect its\nbehaviour was incomplete, outdated and confusing. Try to fix that.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-config.txt |   66 +++++++++++++++++++++++++++++++++++++----\n 1 files changed, 59 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 8f4149f..bd2fff7 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -75,11 +75,22 @@ OPTIONS\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+\tFor writing options: Write to global ~/.gitconfig file rather than\n+\tthe repository .git/config.\n++\n+For reading options: Read only from global ~/.gitconfig rather than\n+from all available files.\n++\n+See also <<FILES>>.\n \n --system::\n-\tUse system-wide $(prefix)/etc/gitconfig rather than the repository\n-\t.git/config.\n+\tFor writing options: Write to system-wide $(prefix)/etc/gitconfig\n+\trather than the repository .git/config.\n++\n+For reading options: Read only from system-wide $(prefix)/etc/gitconfig\n+rather than from all available files.\n++\n+See also <<FILES>>.\n \n --remove-section::\n \tRemove the given section from the configuration file.\n@@ -106,18 +117,59 @@ OPTIONS\n \tby 1024, 1048576, or 1073741824 prior to output.\n \n \n+[[FILES]]\n+FILES\n+-----\n+\n+There are three files where git-config will search for configuration\n+options:\n+\n+.git/config::\n+\tRepository specific configuration file. (The filename is\n+\tof course relative to the repository root, not the working\n+\tdirectory.)\n+\n+~/.gitconfig::\n+\tUser-specific configuration file. Also called \"global\"\n+\tconfiguration file.\n+\n+$(prefix)/etc/gitconfig::\n+\tSystem-wide configuration file.\n+\n+If no further options are given, all reading options will read all of these\n+files that are available. If the global or the system-wide configuration\n+file are not available they will be ignored. If the repository configuration\n+file is not available or readable, git-config will exit with a non-zero\n+error code. However, in neither case will an error message be issued.\n+\n+All writing options will per default write to the repository specific\n+configuration file. Note that this also affects options like '--replace-all'\n+and '--unset'. *git-config will only ever change one file at a time*.\n+\n+You can overwrite these rules either by command line options or by environment\n+variables. The '--global' and the '--system' options will limit the file used\n+to the global or system-wide file respectively. The GIT_CONFIG environment\n+variable has a similar effect, but you can specify any filename you want.\n+\n+The GIT_CONFIG_LOCAL environment variable on the other hand only changes\n+the name used instead of the repository configuration file. The global and\n+the system-wide configuration files will still be read. (For writing options\n+this will obviously result in the same behavior as using GIT_CONFIG.)\n+\n+\n ENVIRONMENT\n -----------\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 \"--global\" option forces this to ~/.gitconfig. Using the\n+\t\"--system\" option forces this to $(prefix)/etc/gitconfig.\n \n GIT_CONFIG_LOCAL::\n-\tCurrently the same as $GIT_CONFIG; when Git will support global\n-\tconfiguration files, this will cause it to take the configuration\n-\tfrom the global configuration file in addition to the given file.\n+\tTake the configuration from the given file instead if .git/config.\n+\tStill read the global and the system-wide configuration files, though.\n \n+See also <<FILES>>.\n \n \n [[EXAMPLES]]\n-- \n1.5.2-rc3.GIT\n"}]}