summaryrefslogtreecommitdiff
path: root/builtin-add.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2008-05-12 19:59:23 +0200
committerJunio C Hamano <gitster@pobox.com>2008-05-12 21:40:15 -0700
commitdad25e4a7c34a3ece1355f84b8c4661438754531 (patch)
tree2f4b9dfed4b5199b8081cb6e18ed134d78317f9a /builtin-add.c
parent89597436450d4665ea8f9f782e71d42539d9f24b (diff)
downloadgit-dad25e4a7c34a3ece1355f84b8c4661438754531.tar.gz
Add a config option to ignore errors for git-add
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-add.c')
-rw-r--r--builtin-add.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/builtin-add.c b/builtin-add.c
index 522519ec86..73235ed08a 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -206,6 +206,15 @@ static struct option builtin_add_options[] = {
OPT_END(),
};
+static int add_config(const char *var, const char *value)
+{
+ if (!strcasecmp(var, "add.ignore-errors")) {
+ ignore_add_errors = git_config_bool(var, value);
+ return 0;
+ }
+ return git_default_config(var, value);
+}
+
int cmd_add(int argc, const char **argv, const char *prefix)
{
int exit_status = 0;
@@ -220,7 +229,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
if (add_interactive)
exit(interactive_add(argc, argv, prefix));
- git_config(git_default_config);
+ git_config(add_config);
newfd = hold_locked_index(&lock_file, 1);