Skip to content

Commit 04ae051

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
pack-objects: create new name-hash algorithm (#5157)
This is an updated version of gitgitgadget#1785, intended for early consumption into Git for Windows. The idea here is to add a new `--full-name-hash` option to `git pack-objects` and `git repack`. This adjusts the name-hash value used for finding delta bases in such a way that uses the full path name with a lower likelihood of collisions than the default name-hash algorithm. In many repositories with name-hash collisions and many versions of those paths, this can significantly reduce the size of a full repack. It can also help in certain cases of `git push`, but only if the pack is already artificially inflated by name-hash collisions; cases that find "sibling" deltas as better choices become worse with `--full-name-hash`. Thus, this option is currently recommended for full repacks of large repos, and on client machines without reachability bitmaps. Some care is taken to ignore this option when using bitmaps, either writing bitmaps or using a bitmap walk during reads. The bitmap file format contains name-hash values, but no way to indicate which function is used, so compatibility is a concern for bitmaps. Future work could explore this idea. After this PR is merged, then the more-involved `--path-walk` option may be considered.
2 parents 0ee3777 + 8f0168f commit 04ae051

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

t/t5551-http-fetch-smart.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,15 @@ test_expect_success CMDLINE_LIMIT \
403403
)
404404
'
405405

406-
test_expect_success 'large fetch-pack requests can be sent using chunked encoding' '
406+
# This is a temporary work-around for libcurl v8.10.0 on the macos-* runners;
407+
# see https://github.com/git-for-windows/git/issues/5159 for full details
408+
test_lazy_prereq UNBROKEN_HTTP2 '
409+
test "$HTTP_PROTO" = HTTP/2 &&
410+
test -z "$(brew info -q curl 2>/dev/null |
411+
sed -n "/^Installed/{N;s/.*8\\.10\\.0.*/BROKEN HTTP2/p;}")"
412+
'
413+
414+
test_expect_success UNBROKEN_HTTP2 'large fetch-pack requests can be sent using chunked encoding' '
407415
GIT_TRACE_CURL=true git -c http.postbuffer=65536 \
408416
clone --bare "$HTTPD_URL/smart/repo.git" split.git 2>err &&
409417
{

0 commit comments

Comments
 (0)