All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH 3/4] Add the configure variable skipFetchAll
@ 2009-11-08 15:47 Björn Gustavsson
  0 siblings, 0 replies; only message in thread
From: Björn Gustavsson @ 2009-11-08 15:47 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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 <bgustavsson@gmail.com>
---
 builtin-fetch.c |    3 ++-
 remote.c        |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/builtin-fetch.c b/builtin-fetch.c
index 7926658..651e9c3 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -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;
 }
 
diff --git a/remote.c b/remote.c
index 73d33f2..beaf9fb 100644
--- a/remote.c
+++ b/remote.c
@@ -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))
-- 
1.6.5.1.69.g36942

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-08 15:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-08 15:47 [RFC/PATCH 3/4] Add the configure variable skipFetchAll Björn Gustavsson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.