Skip to content

Commit bee4369

Browse files
committed
Merge pull request #2375 from assarbad/reintroduce-sideband-config
Config option to disable side-band-64k for transport
2 parents 7741cce + d18a595 commit bee4369

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

Documentation/config.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ include::config/safe.txt[]
509509

510510
include::config/sendemail.txt[]
511511

512+
include::config/sendpack.txt[]
513+
512514
include::config/sequencer.txt[]
513515

514516
include::config/showbranch.txt[]

Documentation/config/sendpack.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sendpack.sideband::
2+
Allows to disable the side-band-64k capability for send-pack even
3+
when it is advertised by the server. Makes it possible to work
4+
around a limitation in the git for windows implementation together
5+
with the dump git protocol. Defaults to true.

send-pack.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ int send_pack(struct send_pack_args *args,
479479
int need_pack_data = 0;
480480
int allow_deleting_refs = 0;
481481
int status_report = 0;
482-
int use_sideband = 0;
482+
int use_sideband = 1;
483483
int quiet_supported = 0;
484484
int agent_supported = 0;
485485
int advertise_sid = 0;
@@ -502,6 +502,7 @@ int send_pack(struct send_pack_args *args,
502502
return 0;
503503
}
504504

505+
git_config_get_bool("sendpack.sideband", &use_sideband);
505506
git_config_get_bool("push.negotiate", &push_negotiate);
506507
if (push_negotiate)
507508
get_commons_through_negotiation(args->url, remote_refs, &commons);
@@ -520,8 +521,7 @@ int send_pack(struct send_pack_args *args,
520521
allow_deleting_refs = 1;
521522
if (server_supports("ofs-delta"))
522523
args->use_ofs_delta = 1;
523-
if (server_supports("side-band-64k"))
524-
use_sideband = 1;
524+
use_sideband = use_sideband && server_supports("side-band-64k");
525525
if (server_supports("quiet"))
526526
quiet_supported = 1;
527527
if (server_supports("agent"))

0 commit comments

Comments
 (0)