Skip to content

Commit 0ece099

Browse files
committed
Merge branch 'sb/unpack-index-pack-buffer-resize' into jch
* sb/unpack-index-pack-buffer-resize: index-pack, unpack-objects: increase input buffer from 4 KiB to 128 KiB
2 parents 154b5bf + 22995aa commit 0ece099

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

builtin/index-pack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ static int check_self_contained_and_connected;
145145

146146
static struct progress *progress;
147147

148-
/* We always read in 4kB chunks. */
149-
static unsigned char input_buffer[4096];
148+
#define INPUT_BUFFER_SIZE (128 * 1024)
149+
static unsigned char input_buffer[INPUT_BUFFER_SIZE];
150150
static unsigned int input_offset, input_len;
151151
static off_t consumed_bytes;
152152
static off_t max_input_size;

builtin/unpack-objects.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
static int dry_run, quiet, recover, has_errors, strict;
2424
static const char unpack_usage[] = "git unpack-objects [-n] [-q] [-r] [--strict]";
2525

26-
/* We always read in 4kB chunks. */
27-
static unsigned char buffer[4096];
26+
#define INPUT_BUFFER_SIZE (128 * 1024)
27+
static unsigned char buffer[INPUT_BUFFER_SIZE];
2828
static unsigned int offset, len;
2929
static off_t consumed_bytes;
3030
static off_t max_input_size;

0 commit comments

Comments
 (0)