summaryrefslogtreecommitdiff
path: root/Documentation/git-config.txt
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2011-05-17 15:38:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-18 04:01:17 (GMT)
commit7a39741999a5216257b1fbcc847cf0c62c114088 (patch)
tree56bad681465958014dd2cff968eb684c2d729509 /Documentation/git-config.txt
parentb602ed7dea968d72c5b3f61ca016de7f285d80ef (diff)
downloadgit-7a39741999a5216257b1fbcc847cf0c62c114088.zip
git-7a39741999a5216257b1fbcc847cf0c62c114088.tar.gz
git-7a39741999a5216257b1fbcc847cf0c62c114088.tar.bz2
config: define and document exit codes
The return codes of git_config_set() and friends are magic numbers right in the source. #define them in cache.h where the functions are declared, and use the constants in the source. Also, mention the resulting exit codes of "git config" in its man page (and complete the list). Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-config.txt')
-rw-r--r--Documentation/git-config.txt22
1 files changed, 12 insertions, 10 deletions
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 8804de3..e7ecf5d 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -50,16 +50,18 @@ The default is to assume the config file of the current repository,
.git/config unless defined otherwise with GIT_DIR and GIT_CONFIG
(see <<FILES>>).
-This command will fail if:
-
-. The config file is invalid,
-. Can not write to the config file,
-. no section was provided,
-. the section or key is invalid,
-. you try to unset an option which does not exist,
-. you try to unset/set an option for which multiple lines match, or
-. you use '--global' option without $HOME being properly set.
-
+This command will fail (with exit code ret) if:
+
+. The config file is invalid (ret=3),
+. can not write to the config file (ret=4),
+. no section or name was provided (ret=2),
+. the section or key is invalid (ret=1),
+. you try to unset an option which does not exist (ret=5),
+. you try to unset/set an option for which multiple lines match (ret=5),
+. you try to use an invalid regexp (ret=6), or
+. you use '--global' option without $HOME being properly set (ret=128).
+
+On success, the command returns the exit code 0.
OPTIONS
-------