summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/send-pack.c b/send-pack.c
index bc0fcdbb00..f2e19838c9 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -84,6 +84,8 @@ static int pack_objects(int fd, struct ref *refs, struct oid_array *advertised,
strvec_push(&po.args, "--progress");
if (is_repository_shallow(the_repository))
strvec_push(&po.args, "--shallow");
+ if (args->disable_bitmaps)
+ strvec_push(&po.args, "--no-use-bitmap-index");
po.in = -1;
po.out = args->stateless_rpc ? -1 : fd;
po.git_cmd = 1;
@@ -264,7 +266,7 @@ static int receive_status(struct packet_reader *reader, struct ref *refs)
return ret;
}
-static int sideband_demux(int in, int out, void *data)
+static int sideband_demux(int in UNUSED, int out, void *data)
{
int *fd = data, ret;
if (async_with_fork())
@@ -487,6 +489,7 @@ int send_pack(struct send_pack_args *args,
struct async demux;
const char *push_cert_nonce = NULL;
struct packet_reader reader;
+ int use_bitmaps;
if (!remote_refs) {
fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
@@ -498,6 +501,9 @@ int send_pack(struct send_pack_args *args,
if (push_negotiate)
get_commons_through_negotiation(args->url, remote_refs, &commons);
+ if (!git_config_get_bool("push.usebitmaps", &use_bitmaps))
+ args->disable_bitmaps = !use_bitmaps;
+
git_config_get_bool("transfer.advertisesid", &advertise_sid);
/* Does the other end support the reporting? */