diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2017-05-25 19:45:33 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-26 12:52:37 +0900 |
commit | 2e96d8154fc072b4778650560acca31a79ef86b0 (patch) | |
tree | 06ba84537afd5b9287f345e57c967bf9fca018f0 /t | |
parent | pack-objects & index-pack: add test for --threads warning (diff) | |
download | tgif-2e96d8154fc072b4778650560acca31a79ef86b0.tar.xz |
pack-objects: fix buggy warning about threads
Fix a buggy warning about threads under NO_PTHREADS=YesPlease. Due to
re-using the delta_search_threads variable for both the state of the
"pack.threads" config & the --threads option, setting "pack.threads"
but not supplying --threads would trigger the warning for both
"pack.threads" & --threads.
Solve this bug by resetting the delta_search_threads variable in
git_pack_config(), it might then be set by --threads again and be
subsequently warned about, as the test I'm changing here asserts.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5300-pack-object.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index 6ed23ee1d2..9c68b99251 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -447,7 +447,7 @@ test_expect_success !PTHREADS,C_LOCALE_OUTPUT 'pack-objects --threads=N or pack. git -c pack.threads=2 pack-objects --stdout --all </dev/null >/dev/null 2>err && grep ^warning: err >warnings && - test_must_fail test_line_count = 1 warnings && + test_line_count = 1 warnings && grep -F "no threads support, ignoring pack.threads" err && git -c pack.threads=2 pack-objects --threads=4 --stdout --all </dev/null >/dev/null 2>err && |