diff options
author | Taylor Blau <me@ttaylorr.com> | 2022-10-31 02:04:42 +0100 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2022-10-31 02:04:42 +0100 |
commit | c88895e67b0f7bfd9aff603e57e16dcb3a803d1e (patch) | |
tree | 9bd0d4724e8d04077f15d9b261f6d2057729f00f /t/t7700-repack.sh | |
parent | Merge branch 'sg/stable-docdep' (diff) | |
parent | t7700: annotate cruft-pack failure with ok=sigpipe (diff) | |
download | git-c88895e67b0f7bfd9aff603e57e16dcb3a803d1e.tar.xz git-c88895e67b0f7bfd9aff603e57e16dcb3a803d1e.zip |
Merge branch 'jk/repack-tempfile-cleanup'
The way "git repack" creared temporary files when it received a
signal was prone to deadlocking, which has been corrected.
* jk/repack-tempfile-cleanup:
t7700: annotate cruft-pack failure with ok=sigpipe
repack: drop remove_temporary_files()
repack: use tempfiles for signal cleanup
repack: expand error message for missing pack files
repack: populate extension bits incrementally
repack: convert "names" util bitfield to array
Diffstat (limited to 't/t7700-repack.sh')
-rwxr-xr-x | t/t7700-repack.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh index 10e4e9663b..5be483bf88 100755 --- a/t/t7700-repack.sh +++ b/t/t7700-repack.sh @@ -477,6 +477,22 @@ test_expect_success TTY '--quiet disables progress' ' test_must_be_empty stderr ' +test_expect_success 'clean up .tmp-* packs on error' ' + test_must_fail ok=sigpipe git \ + -c repack.cruftwindow=bogus \ + repack -ad --cruft && + find $objdir/pack -name '.tmp-*' >tmpfiles && + test_must_be_empty tmpfiles +' + +test_expect_success 'repack -ad cleans up old .tmp-* packs' ' + git rev-parse HEAD >input && + git pack-objects $objdir/pack/.tmp-1234 <input && + git repack -ad && + find $objdir/pack -name '.tmp-*' >tmpfiles && + test_must_be_empty tmpfiles +' + test_expect_success 'setup for update-server-info' ' git init update-server-info && test_commit -C update-server-info message |