author | Junio C Hamano <gitster@pobox.com> | |
Tue, 29 Mar 2011 21:09:02 +0000 (14:09 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 29 Mar 2011 21:09:02 +0000 (14:09 -0700) |
* sp/maint-fetch-pack-stop-early:
enable "no-done" extension only when fetching over smart-http
* sp/maint-upload-pack-stop-early:
enable "no-done" extension only when serving over smart-http
enable "no-done" extension only when fetching over smart-http
* sp/maint-upload-pack-stop-early:
enable "no-done" extension only when serving over smart-http
builtin/fetch-pack.c | patch | blob | history | |
upload-pack.c | patch | blob | history |
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index bf9990ce15bf582293535606467fb209457bcfe1..65a8727453320f68e1230f702392c5ca3bb76884 100644 (file)
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
if (server_supports("no-done")) {
if (args.verbose)
fprintf(stderr, "Server supports no-done\n");
- no_done = 1;
+ if (args.stateless_rpc)
+ no_done = 1;
}
}
else if (server_supports("multi_ack")) {
diff --git a/upload-pack.c b/upload-pack.c
index 72aa661f8dabb7203001a7d9295dcf6c10ca75ee..bba053f0aac8eef982d6779983dc6fd979d69d69 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -640,15 +640,16 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
{
static const char *capabilities = "multi_ack thin-pack side-band"
" side-band-64k ofs-delta shallow no-progress"
- " include-tag multi_ack_detailed no-done";
+ " include-tag multi_ack_detailed";
struct object *o = parse_object(sha1);
if (!o)
die("git upload-pack: cannot find object %s:", sha1_to_hex(sha1));
if (capabilities)
- packet_write(1, "%s %s%c%s\n", sha1_to_hex(sha1), refname,
- 0, capabilities);
+ packet_write(1, "%s %s%c%s%s\n", sha1_to_hex(sha1), refname,
+ 0, capabilities,
+ stateless_rpc ? " no-done" : "");
else
packet_write(1, "%s %s\n", sha1_to_hex(sha1), refname);
capabilities = NULL;