Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 9860bbb

Browse files
committed
Merge remote-tracking branch 't-b/sideband-bug'
This will allow us to work around the push issues pointed out in #101. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents db40d88 + b6e7fcf commit 9860bbb

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Documentation/config.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2387,3 +2387,9 @@ web.browser::
23872387
Specify a web browser that may be used by some commands.
23882388
Currently only linkgit:git-instaweb[1] and linkgit:git-help[1]
23892389
may use it.
2390+
2391+
sendpack.sideband::
2392+
Allows to disable the side-band-64k capability for send-pack even
2393+
when it is advertised by the server. Makes it possible to work
2394+
around a limitation in the git for windows implementation together
2395+
with the dump git protocol. Defaults to true.

send-pack.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@
1212
#include "version.h"
1313
#include "sha1-array.h"
1414

15+
static int config_use_sideband = 1;
16+
17+
static int send_pack_config(const char *var, const char *value, void *unused)
18+
{
19+
if (!strcmp("sendpack.sideband", var))
20+
config_use_sideband = git_config_bool(var, value);
21+
22+
return 0;
23+
}
24+
1525
static int feed_object(const unsigned char *sha1, int fd, int negative)
1626
{
1727
char buf[42];
@@ -209,14 +219,16 @@ int send_pack(struct send_pack_args *args,
209219
int ret;
210220
struct async demux;
211221

222+
git_config(send_pack_config, NULL);
223+
212224
/* Does the other end support the reporting? */
213225
if (server_supports("report-status"))
214226
status_report = 1;
215227
if (server_supports("delete-refs"))
216228
allow_deleting_refs = 1;
217229
if (server_supports("ofs-delta"))
218230
args->use_ofs_delta = 1;
219-
if (server_supports("side-band-64k"))
231+
if (config_use_sideband && server_supports("side-band-64k"))
220232
use_sideband = 1;
221233
if (server_supports("quiet"))
222234
quiet_supported = 1;

0 commit comments

Comments
 (0)