98
static struct transport *gsecondary;
99
static struct refspec refmap = REFSPEC_INIT_FETCH;
100
static struct string_list server_options = STRING_LIST_INIT_DUP;
101
-static struct string_list negotiation_tip = STRING_LIST_INIT_NODUP;
101
+static struct string_list negotiation_restrict = STRING_LIST_INIT_NODUP;
102
103
struct fetch_config {
104
enum display_format display_format;
1534
return 0;
1535
}
1536
1537
-static void add_negotiation_tips(struct git_transport_options *smart_options)
1537
+static void add_negotiation_restrict_tips(struct git_transport_options *smart_options)
1538
{
1539
struct oid_array *oids = xcalloc(1, sizeof(*oids));
1540
int i;
1541
1542
- for (i = 0; i < negotiation_tip.nr; i++) {
1543
- const char *s = negotiation_tip.items[i].string;
1542
+ for (i = 0; i < negotiation_restrict.nr; i++) {
1543
+ const char *s = negotiation_restrict.items[i].string;
1544
struct refs_for_each_ref_options opts = {
1545
.pattern = s,
1546
};
1561
warning(_("ignoring %s=%s because it does not match any refs"),
1562
"--negotiation-restrict", s);
1563
}
1564
- smart_options->negotiation_tips = oids;
1564
+ smart_options->negotiation_restrict_tips = oids;
1565
}
1566
1567
static struct transport *prepare_transport(struct remote *remote, int deepen,
1595
set_option(transport, TRANS_OPT_LIST_OBJECTS_FILTER, spec);
1596
set_option(transport, TRANS_OPT_FROM_PROMISOR, "1");
1597
}
1598
- if (negotiation_tip.nr) {
1598
+ if (negotiation_restrict.nr) {
1599
if (transport->smart_options)
1600
- add_negotiation_tips(transport->smart_options);
1600
+ add_negotiation_restrict_tips(transport->smart_options);
1601
else
1602
warning(_("ignoring %s because the protocol does not support it"),
1603
"--negotiation-restrict");
2566
N_("specify fetch refmap"), PARSE_OPT_NONEG, parse_refmap_arg),
2567
OPT_STRING_LIST('o', "server-option", &server_options, N_("server-specific"), N_("option to transmit")),
2568
OPT_IPVERSION(&family),
2569
- OPT_STRING_LIST(0, "negotiation-restrict", &negotiation_tip, N_("revision"),
2569
+ OPT_STRING_LIST(0, "negotiation-restrict", &negotiation_restrict, N_("revision"),
2570
N_("report that we have only objects reachable from this object")),
2571
OPT_ALIAS(0, "negotiation-tip", "negotiation-restrict"),
2572
OPT_BOOL(0, "negotiate-only", &negotiate_only,
2658
config.display_format = DISPLAY_FORMAT_PORCELAIN;
2659
}
2660
2661
- if (negotiate_only && !negotiation_tip.nr)
2661
+ if (negotiate_only && !negotiation_restrict.nr)
2662
die(_("%s needs one or more %s"), "--negotiate-only",
2663
"--negotiation-restrict=*");
2664