{"thread":{"id":"21536","subject":"[RFC/PATCH 3/4] Add the configure variable skipFetchAll","startedAt":"2009-11-08T15:47:54Z","lastAt":"2009-11-08T15:47:54Z","messageCount":1,"participants":["Björn Gustavsson"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"127084","messageId":"4AF6E82A.4040404@gmail.com","threadId":"21536","inReplyTo":null,"subject":"[RFC/PATCH 3/4] Add the configure variable skipFetchAll","fromName":"Björn Gustavsson","fromEmail":"bgustavsson@gmail.com","sentAt":"2009-11-08T15:47:54Z","receivedAt":"2009-11-08T15:47:54Z","isPatch":true,"sender":{"key":"bgustavsson@gmail.com","avatar":"https://avatars.githubusercontent.com/u/74840?v=4"},"body":"Implement the configure skipFetchAll variable to allow\ncertain remotes to be skipped when doing 'git fetch --all' and\n'git remote update'. The existing skipDefaultUpdate variable\nis still honored (by 'git fetch --all' and 'git remote update').\n(If both are set in the configuration file with different values,\nthe value of the last occurrence will be used.)\n\nSigned-off-by: Björn Gustavsson <bgustavsson@gmail.com>\n---\n builtin-fetch.c |    3 ++-\n remote.c        |    3 ++-\n 2 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-fetch.c b/builtin-fetch.c\nindex 7926658..651e9c3 100644\n--- a/builtin-fetch.c\n+++ b/builtin-fetch.c\n@@ -688,7 +688,8 @@ static void set_option(const char *name, const char *value)\n static int get_one_remote_for_fetch(struct remote *remote, void *priv)\n {\n \tstruct string_list *list = priv;\n-\tstring_list_append(remote->name, list);\n+\tif (!remote->skip_default_update)\n+\t\tstring_list_append(remote->name, list);\n \treturn 0;\n }\n \ndiff --git a/remote.c b/remote.c\nindex 73d33f2..beaf9fb 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -396,7 +396,8 @@ static int handle_config(const char *key, const char *value, void *cb)\n \t\tremote->mirror = git_config_bool(key, value);\n \telse if (!strcmp(subkey, \".skipdefaultupdate\"))\n \t\tremote->skip_default_update = git_config_bool(key, value);\n-\n+\telse if (!strcmp(subkey, \".skipfetchall\"))\n+\t\tremote->skip_default_update = git_config_bool(key, value);\n \telse if (!strcmp(subkey, \".url\")) {\n \t\tconst char *v;\n \t\tif (git_config_string(&v, key, value))\n-- \n1.6.5.1.69.g36942\n"}]}