Skip to content

Commit 92f0a3f

Browse files
committed
Merge 'sideband-bug' into HEAD
This works around the push-over-git-protocol issues pointed out in msysgit#101. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents a557189 + c7953e3 commit 92f0a3f

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
@@ -3072,3 +3072,9 @@ web.browser::
30723072
Specify a web browser that may be used by some commands.
30733073
Currently only linkgit:git-instaweb[1] and linkgit:git-help[1]
30743074
may use it.
3075+
3076+
sendpack.sideband::
3077+
Allows to disable the side-band-64k capability for send-pack even
3078+
when it is advertised by the server. Makes it possible to work
3079+
around a limitation in the git for windows implementation together
3080+
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
@@ -36,6 +36,16 @@ int option_parse_push_signed(const struct option *opt,
3636
die("bad %s argument: %s", opt->long_name, arg);
3737
}
3838

39+
static int config_use_sideband = 1;
40+
41+
static int send_pack_config(const char *var, const char *value, void *unused)
42+
{
43+
if (!strcmp("sendpack.sideband", var))
44+
config_use_sideband = git_config_bool(var, value);
45+
46+
return 0;
47+
}
48+
3949
static void feed_object(const unsigned char *sha1, FILE *fh, int negative)
4050
{
4151
if (negative && !has_sha1_file(sha1))
@@ -380,14 +390,16 @@ int send_pack(struct send_pack_args *args,
380390
struct async demux;
381391
const char *push_cert_nonce = NULL;
382392

393+
git_config(send_pack_config, NULL);
394+
383395
/* Does the other end support the reporting? */
384396
if (server_supports("report-status"))
385397
status_report = 1;
386398
if (server_supports("delete-refs"))
387399
allow_deleting_refs = 1;
388400
if (server_supports("ofs-delta"))
389401
args->use_ofs_delta = 1;
390-
if (server_supports("side-band-64k"))
402+
if (config_use_sideband && server_supports("side-band-64k"))
391403
use_sideband = 1;
392404
if (server_supports("quiet"))
393405
quiet_supported = 1;

0 commit comments

Comments
 (0)