Changing or clearing this value will only affect fetches for new commits.
To fetch associated objects for commits already present in the local object
database, use the `--refetch` option of linkgit:git-fetch[1].
+
+remote.<name>.serverOption::
+ The default set of server options used when fetching from this remote.
+ These server options can be overridden by the `--server-option=` command
+ line arguments.
++
+This is a multi-valued variable, and an empty value can be used in a higher
+priority configuration file (e.g. `.git/config` in a repository) to clear
+the values inherited from a lower priority configuration files (e.g.
+`$HOME/.gitconfig`).
#include "advice.h"
#include "connect.h"
#include "parse-options.h"
+#include "transport.h"
enum map_direction { FROM_SRC, FROM_DST };
ret->name = xstrndup(name, len);
refspec_init(&ret->push, REFSPEC_PUSH);
refspec_init(&ret->fetch, REFSPEC_FETCH);
+ string_list_init_dup(&ret->server_options);
ALLOC_GROW(remote_state->remotes, remote_state->remotes_nr + 1,
remote_state->remotes_alloc);
free((char *)remote->uploadpack);
FREE_AND_NULL(remote->http_proxy);
FREE_AND_NULL(remote->http_proxy_authmethod);
+ string_list_clear(&remote->server_options, 0);
}
static void add_merge(struct branch *branch, const char *name)
} else if (!strcmp(subkey, "vcs")) {
FREE_AND_NULL(remote->foreign_vcs);
return git_config_string(&remote->foreign_vcs, key, value);
+ } else if (!strcmp(subkey, "serveroption")) {
+ return parse_transport_option(key, value,
+ &remote->server_options);
}
return 0;
}
#include "hash.h"
#include "hashmap.h"
#include "refspec.h"
+#include "string-list.h"
#include "strvec.h"
struct option;
/* The method used for authenticating against `http_proxy`. */
char *http_proxy_authmethod;
+
+ struct string_list server_options;
};
/**