aboutsummaryrefslogtreecommitdiff
path: root/builtin-config.c
Commit message (Collapse)AuthorAge
* git-config: print error message if the config file cannot be readGerrit Pape2007-10-18
| | | | | | | | | | | Instead of simply exiting with 255, print an error message including the reason why a config file specified through --file cannot be opened or read. The problem was noticed by Joey Hess, reported through http://bugs.debian.org/445208 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* git-config: handle --file option with relative pathname properlyGerrit Pape2007-10-15
| | | | | | | | | | | | | | | When calling git-config not from the top level directory of a repository, it changes directory before trying to open the config file specified through the --file option, which then fails if the config file was specified by a relative pathname. This patch adjusts the pathname to the config file if applicable. The problem was noticed by Joey Hess, reported through http://bugs.debian.org/445208 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* git-config: don't silently ignore options after --listFrank Lichtenheld2007-10-15
| | | | | | | | | Error out if someone gives options after --list since that is not a valid syntax. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add an option to specify a file to config builtinAlex Riesen2007-07-31
| | | | | | | | | There are (really!) systems where using environment variables is very cumbersome (yes, Windows, it has problems unsetting them). Besides this form is shorter. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* getenv/setenv: use constants if availableMatthias Lederhofer2007-07-02
| | | | | | | | | | There were places using "GIT_DIR" instead of GIT_DIR_ENVIRONMENT and "GIT_CONFIG" instead of CONFIG_ENVIRONMENT. This makes it easier to find all places touching an environment variable using git grep or similar tools. Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* config: add support for --bool and --int while setting valuesFrank Lichtenheld2007-06-26
| | | | | Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* config: Add --null/-z option for null-delimted outputFrank Lichtenheld2007-06-26
| | | | | | | | | Use \n as delimiter between key and value and \0 as delimiter after each key/value pair. This should be easily parsable output. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* config: Change output of --get-regexp for valueless keysFrank Lichtenheld2007-06-26
| | | | | | | | | Print no space after the name of a key without value. Otherwise keys without values are printed exactly the same as keys with empty values. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Update git-config documentationAndrew Ruder2007-04-18
| | | | | | | | Documentation/git-config.txt: Added documentation for --system Documentation/builtin-config.c: Added --system to the short usage Signed-off-by: Andrew Ruder <andy@aeruder.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-config: document --rename-section, provide --remove-sectionPaolo Bonzini2007-03-03
| | | | | | | | | This patch documents the previously undocumented option --rename-section and adds a new option to zap an entire section. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* config: read system-wide defaults from /etc/gitconfigJohannes Schindelin2007-02-19
| | | | | | | | The settings in /etc/gitconfig can be overridden in ~/.gitconfig, which in turn can be overridden in .git/config. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Rename git-repo-config to git-config.Tom Prince2007-01-28
Signed-off-by: Tom Prince <tom.prince@ualberta.net> Signed-off-by: Junio C Hamano <junkio@cox.net>