Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-12-01 21:36:15 +0300
committerJunio C Hamano <gitster@pobox.com>2010-12-02 00:40:12 +0300
commit6b3020a241e2c0a1eaa6b74a10a796603bb90975 (patch)
treeb9c275f975e2a1dbb39f2e5ef326afee51dd7a90
parent593ce2bea5dad436e87b5dd37c205961d73feae9 (diff)
add: introduce add.ignoreerrors synonym for add.ignore-errors
The "[add] ignore-errors" tweakable introduced by v1.5.6-rc0~30^2 (Add a config option to ignore errors for git-add, 2008-05-12) does not follow the usual convention for naming values in the git configuration file. What convention? Glad you asked. The section name indicates the affected subsystem. The subsection name, if any, indicates which of an unbound set of things to set the value for. The variable name describes the effect of tweaking this knob. The section and variable names can be broken into words using bumpyCaps in documentation as a hint to the reader. These word breaks are not significant at the level of code, since the section and variable names are not case sensitive. The name "add.ignore-errors" includes a dash, meaning a naive configuration file like [add] ignoreErrors does not have any effect. Avoid such confusion by renaming to the more consistent add.ignoreErrors, but keep the old version for backwards compatibility. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Documentation/config.txt6
-rw-r--r--builtin-add.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 8adb55c801..ce9c2509b6 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -534,9 +534,13 @@ core.sparseCheckout::
linkgit:git-read-tree[1] for more information.
add.ignore-errors::
+add.ignoreErrors::
Tells 'git add' to continue adding files when some files cannot be
added due to indexing errors. Equivalent to the '--ignore-errors'
- option of linkgit:git-add[1].
+ option of linkgit:git-add[1]. Older versions of git accept only
+ `add.ignore-errors`, which does not follow the usual naming
+ convention for configuration variables. Newer versions of git
+ honor `add.ignoreErrors` as well.
alias.*::
Command aliases for the linkgit:git[1] command wrapper - e.g.
diff --git a/builtin-add.c b/builtin-add.c
index 87d2980313..51eeabad86 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -328,7 +328,8 @@ static struct option builtin_add_options[] = {
static int add_config(const char *var, const char *value, void *cb)
{
- if (!strcasecmp(var, "add.ignore-errors")) {
+ if (!strcasecmp(var, "add.ignoreerrors") ||
+ !strcasecmp(var, "add.ignore-errors")) {
ignore_add_errors = git_config_bool(var, value);
return 0;
}