36
static int server_supports_filtering;
37
static struct lock_file shallow_lock;
38
static const char *alternate_shallow_file;
39
-static char *negotiation_algorithm;
39
static struct strbuf fsck_msg_types = STRBUF_INIT;
40
41
/* Remember to update object flag allocation in object.h */
891
struct shallow_info *si,
892
char **pack_lockfile)
893
{
894
+ struct repository *r = the_repository;
895
struct ref *ref = copy_ref_list(orig_ref);
896
struct object_id oid;
897
const char *agent_feature;
898
int agent_len;
899
struct fetch_negotiator negotiator;
900
- fetch_negotiator_init(&negotiator, negotiation_algorithm);
900
+ fetch_negotiator_init(r, &negotiator);
901
902
sort_ref_list(&ref, ref_compare_name);
903
QSORT(sought, nr_sought, cmp_ref_by_name);
911
912
if (server_supports("shallow"))
913
print_verbose(args, _("Server supports %s"), "shallow");
914
- else if (args->depth > 0 || is_repository_shallow(the_repository))
914
+ else if (args->depth > 0 || is_repository_shallow(r))
915
die(_("Server does not support shallow clients"));
916
if (args->depth > 0 || args->deepen_since || args->deepen_not)
917
args->deepen = 1;
1379
struct shallow_info *si,
1380
char **pack_lockfile)
1381
{
1382
+ struct repository *r = the_repository;
1383
struct ref *ref = copy_ref_list(orig_ref);
1384
enum fetch_state state = FETCH_CHECK_LOCAL;
1385
struct oidset common = OIDSET_INIT;
1387
int in_vain = 0;
1388
int haves_to_send = INITIAL_FLUSH;
1389
struct fetch_negotiator negotiator;
1389
- fetch_negotiator_init(&negotiator, negotiation_algorithm);
1390
+ fetch_negotiator_init(r, &negotiator);
1391
packet_reader_init(&reader, fd[0], NULL, 0,
1392
PACKET_READ_CHOMP_NEWLINE |
1393
PACKET_READ_DIE_ON_ERR_PACKET);
1506
git_config_get_bool("repack.usedeltabaseoffset", &prefer_ofs_delta);
1507
git_config_get_bool("fetch.fsckobjects", &fetch_fsck_objects);
1508
git_config_get_bool("transfer.fsckobjects", &transfer_fsck_objects);
1508
- git_config_get_string("fetch.negotiationalgorithm",
1509
- &negotiation_algorithm);
1509
1510
git_config(fetch_pack_config_cb, NULL);
1511
}