summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/fetch-pack.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 1abe624..b4f34a2 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -219,10 +219,15 @@ static void send_request(int fd, struct strbuf *buf)
}
#define INITIAL_FLUSH 32
+#define LARGE_FLUSH 1024
static int next_flush(int count)
{
- return INITIAL_FLUSH + count;
+ if (count < LARGE_FLUSH)
+ count <<= 1;
+ else
+ count += LARGE_FLUSH;
+ return count;
}
static int find_common(int fd[2], unsigned char *result_sha1,