aboutsummaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-09-19 00:49:39 -0400
committerJunio C Hamano <gitster@pobox.com>2007-09-19 03:22:31 -0700
commit50ab5fd3fc16fbe01170059977533fa2c7c4d448 (patch)
tree23e9ee385b026ca1de16bbc15b15f46549c20bd2 /transport.c
parentfa74052922cf39e5a39ad7178d1b13c2da9b4519 (diff)
downloadgit-50ab5fd3fc16fbe01170059977533fa2c7c4d448.tar.gz
git-50ab5fd3fc16fbe01170059977533fa2c7c4d448.tar.xz
Ensure builtin-fetch honors {fetch,transfer}.unpackLimit
The only way to configure the unpacking limit is currently through the .git/config (or ~/.gitconfig) mechanism as we have no existing command line option interface to control this threshold on a per invocation basis. This was intentional by design as the storage policy of the repository should be a repository-wide decision and should not be subject to variations made on individual command executions. Earlier builtin-fetch was bypassing the unpacking limit chosen by the user through the configuration file as it did not reread the configuration options through fetch_pack_config if we called the internal fetch_pack() API directly. We now ensure we always run the config file through fetch_pack_config at least once in this process, thereby setting our unpackLimit properly. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/transport.c b/transport.c
index 85f5b1ed4..a1d0a3c89 100644
--- a/transport.c
+++ b/transport.c
@@ -242,11 +242,7 @@ static int close_bundle(struct transport *transport)
struct git_transport_data {
unsigned thin : 1;
unsigned keep : 1;
-
- int unpacklimit;
-
int depth;
-
const char *uploadpack;
const char *receivepack;
};
@@ -267,9 +263,6 @@ static int set_git_option(struct transport *connection,
} else if (!strcmp(name, TRANS_OPT_KEEP)) {
data->keep = !!value;
return 0;
- } else if (!strcmp(name, TRANS_OPT_UNPACKLIMIT)) {
- data->unpacklimit = atoi(value);
- return 0;
} else if (!strcmp(name, TRANS_OPT_DEPTH)) {
if (!value)
data->depth = 0;
@@ -318,7 +311,6 @@ static int fetch_refs_via_pack(struct transport *transport,
args.uploadpack = data->uploadpack;
args.keep_pack = data->keep;
args.lock_pack = 1;
- args.unpacklimit = data->unpacklimit;
args.use_thin_pack = data->thin;
args.verbose = transport->verbose;
args.depth = data->depth;
@@ -435,7 +427,6 @@ struct transport *transport_get(struct remote *remote, const char *url)
data->receivepack = "git-receive-pack";
if (remote && remote->receivepack)
data->receivepack = remote->receivepack;
- data->unpacklimit = -1;
}
return ret;