Add the configure variable skipFetchAll
PATCH 3/4 Add the configure variable skipFetchAll
Implement the configure skipFetchAll variable to allow certain remotes to be skipped when doing 'git fetch --all' and 'git remote update'. The existing skipDefaultUpdate variable is still honored (by 'git fetch --all' and 'git remote update'). (If both are set in the configuration file with different values, the value of the last occurrence will be used.)
Signed-off-by Björn Gustavsson <[email protected]>
--- builtin-fetch.c | 3 ++- remote.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
builtin-fetch.c +2 -1
@@ -688,7 +688,8 @@ static void set_option(const char *name, const char *value)static int get_one_remote_for_fetch (struct remote *remote,void *priv) {struct string_list *list = priv; -string_list_append (remote->name, list); +if (!remote->skip_default_update) +string_list_append (remote->name, list);return 0 ; }
remote.c +2 -1
@@ -396,7 +396,8 @@ static int handle_config(const char *key, const char *value, void *cb) remote->mirror =git_config_bool (key, value); else if (!strcmp(subkey, ".skipdefaultupdate")) remote->skip_default_update =git_config_bool (key, value); - + else if (!strcmp(subkey, ".skipfetchall")) + remote->skip_default_update =git_config_bool (key, value); else if (!strcmp(subkey, ".url")) {const char *v;if (git_config_string (&v, key, value))
Signature · 1 line
1.6.5.1.69.g36942