]> git.99rst.org Git - git.git/commit
t5608: reduce maximum disk usage
authorPatrick Steinhardt <redacted>
Mon, 6 Jul 2026 06:23:59 +0000 (08:23 +0200)
committerJunio C Hamano <redacted>
Mon, 6 Jul 2026 14:21:57 +0000 (07:21 -0700)
commitbc1854f525ecc07043ccf131d18217adb926c876
tree7b4013206f900a87321855f266b05e2d41481413
parentf0598d079afa3110ef662fd543a83923cf72a5f3
t5608: reduce maximum disk usage

The tests in t5608 perform a couple of clones of repositories that are
somewhat large. Ultimately, we end up creating:

  - A setup repository that contains 2GB of uncompressed pack data.

  - A bare clone that contains the same 2GB of data.

  - A clone with worktree writes a 2GB packfile and a 2GB worktree.

  - A second setup repository that contains a 4GB packfile.

  - Two 4GB clone of that repository.

Some of these clones ultimately hardlink files, which ensures that we at
least don't end up with more than 20GB of data. But at the end of the
test we still have around 16GB of data, which is only a tiny bit better.

Refactor the test to prune repositories after they have no use anymore.
This reduced the peak disk usage of this test to 8GB.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t5608-clone-2gb.sh
git clone https://git.99rst.org/PROJECT