Additionally, update some tests for which the multi-threaded result
differs from the single-threaded result and the single-threaded
result is expected.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
Two of the tests in t5300-pack-object.sh failed when multiple
threads were used. My fix was to set --threads=1 for all pack-objects
calls. I didn't look into it any further than that. All other tests
passed.
-brandon
builtin-pack-objects.c | 2 +-
t/t5300-pack-object.sh | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 5c55c11..743de52 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -70,7 +70,7 @@ static int progress = 1;
static int window = 10;
static uint32_t pack_size_limit, pack_size_limit_cfg;
static int depth = 50;
-static int delta_search_threads = 1;
+static int delta_search_threads = 0;
static int pack_to_stdout;
static int num_preferred_base;
static struct progress *progress_state;
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index cd3c149..16ee940 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -35,7 +35,7 @@ test_expect_success \
test_expect_success \
'pack without delta' \
- 'packname_1=$(git pack-objects --window=0 test-1 <obj-list)'
+ 'packname_1=$(git pack-objects --threads=1 --window=0 test-1 <obj-list)'
rm -fr .git2
mkdir .git2
@@ -66,7 +66,7 @@ cd "$TRASH"
test_expect_success \
'pack with REF_DELTA' \
'pwd &&
- packname_2=$(git pack-objects test-2 <obj-list)'
+ packname_2=$(git pack-objects --threads=1 test-2 <obj-list)'
rm -fr .git2
mkdir .git2
@@ -96,7 +96,7 @@ cd "$TRASH"
test_expect_success \
'pack with OFS_DELTA' \
'pwd &&
- packname_3=$(git pack-objects --delta-base-offset test-3 <obj-list)'
+ packname_3=$(git pack-objects --threads=1 --delta-base-offset test-3 <obj-list)'
...