summaryrefslogtreecommitdiff
path: root/builtin/rebase.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2022-07-29 12:28:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-07-29 16:09:07 (GMT)
commit32ed3314c104733ea27e06a82efae569dacd825a (patch)
tree1d132ac593451ef635800fc34150fa0fcd721b91 /builtin/rebase.c
parentce50f1f3ac9c2e053b1b4644587be8ef1f69af88 (diff)
downloadgit-32ed3314c104733ea27e06a82efae569dacd825a.zip
git-32ed3314c104733ea27e06a82efae569dacd825a.tar.gz
git-32ed3314c104733ea27e06a82efae569dacd825a.tar.bz2
t5351: avoid using `test_cmp` for binary data
The `test_cmp` function is meant to provide nicer output than `cmp` when expected and actual output of Git commands disagree. The implicit assumption is that the output is line-based and human readable. However, aaf81223f48 (unpack-objects: use stream_loose_object() to unpack large objects, 2022-06-11) introduced a call that compares the contents of pack files, which are distinctly not line-based nor human readable. This causes problems because on Windows, we hand off to the Bash function `mingw_test_cmp` that compares the lines while ignoring line ending differences. And this Bash function spends an insane amount of cycles trying to read in that binary pack file, so that it is almost indistinguishable from an infinite loop. For example, t5351 took 1486 seconds in the CI run at https://github.com/git/git/runs/7398490747?check_suite_focus=true#step:5:171, to complete. And yes, that is almost half an hour. Since Git's tests already use `cmp` consistently when comparing pack files, let's change this instance to use `cmp` instead of `test_cmp`, too, and fix that performance problem. Now t5351 takes all of 22 seconds. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rebase.c')
0 files changed, 0 insertions, 0 deletions