From: Doug Kelly <dougk.ff7@gmail.com>
To: git@vger.kernel.org
Cc: Doug Kelly <dougk.ff7@gmail.com>
Subject: [PATCH 2/3] t5304: Add test for .bitmap garbage files
Date: Fri, 13 Nov 2015 16:10:52 -0800 [thread overview]
Message-ID: <1447459853-28838-3-git-send-email-dougk.ff7@gmail.com> (raw)
In-Reply-To: <1447459853-28838-1-git-send-email-dougk.ff7@gmail.com>
When checking for pack garbage, .bitmap files are now detected as
garbage when not associated with another .pack/.idx file.
Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
---
t/t5304-prune.sh | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
index 1ea8279..4fa6e7a 100755
--- a/t/t5304-prune.sh
+++ b/t/t5304-prune.sh
@@ -230,6 +230,12 @@ test_expect_success 'garbage report in count-objects -v' '
: >.git/objects/pack/fake.idx &&
: >.git/objects/pack/fake2.keep &&
: >.git/objects/pack/fake3.idx &&
+ : >.git/objects/pack/fake4.bitmap &&
+ : >.git/objects/pack/fake5.bitmap &&
+ : >.git/objects/pack/fake5.idx &&
+ : >.git/objects/pack/fake6.keep &&
+ : >.git/objects/pack/fake6.bitmap &&
+ : >.git/objects/pack/fake6.idx &&
git count-objects -v 2>stderr &&
grep "index file .git/objects/pack/fake.idx is too small" stderr &&
grep "^warning:" stderr | sort >actual &&
@@ -238,14 +244,20 @@ warning: garbage found: .git/objects/pack/fake.bar
warning: garbage found: .git/objects/pack/foo
warning: garbage found: .git/objects/pack/foo.bar
warning: no corresponding .idx or .pack: .git/objects/pack/fake2.keep
+warning: no corresponding .idx or .pack: .git/objects/pack/fake4.bitmap
warning: no corresponding .idx: .git/objects/pack/foo.keep
warning: no corresponding .idx: .git/objects/pack/foo.pack
warning: no corresponding .pack: .git/objects/pack/fake3.idx
+warning: no corresponding .pack: .git/objects/pack/fake5.bitmap
+warning: no corresponding .pack: .git/objects/pack/fake5.idx
+warning: no corresponding .pack: .git/objects/pack/fake6.bitmap
+warning: no corresponding .pack: .git/objects/pack/fake6.idx
+warning: no corresponding .pack: .git/objects/pack/fake6.keep
EOF
test_cmp expected actual
'
-test_expect_success 'clean pack garbage with gc' '
+test_expect_failure 'clean pack garbage with gc' '
test_when_finished "rm -f .git/objects/pack/fake*" &&
test_when_finished "rm -f .git/objects/pack/foo*" &&
: >.git/objects/pack/foo.keep &&
@@ -254,15 +266,21 @@ test_expect_success 'clean pack garbage with gc' '
: >.git/objects/pack/fake2.keep &&
: >.git/objects/pack/fake2.idx &&
: >.git/objects/pack/fake3.keep &&
+ : >.git/objects/pack/fake4.bitmap &&
+ : >.git/objects/pack/fake5.bitmap &&
+ : >.git/objects/pack/fake5.idx &&
+ : >.git/objects/pack/fake6.keep &&
+ : >.git/objects/pack/fake6.bitmap &&
+ : >.git/objects/pack/fake6.idx &&
git gc &&
git count-objects -v 2>stderr &&
grep "^warning:" stderr | sort >actual &&
cat >expected <<\EOF &&
+warning: no corresponding .idx or .pack: .git/objects/pack/fake2.keep
warning: no corresponding .idx or .pack: .git/objects/pack/fake3.keep
+warning: no corresponding .idx or .pack: .git/objects/pack/fake6.keep
warning: no corresponding .idx: .git/objects/pack/foo.keep
warning: no corresponding .idx: .git/objects/pack/foo.pack
-warning: no corresponding .pack: .git/objects/pack/fake2.idx
-warning: no corresponding .pack: .git/objects/pack/fake2.keep
EOF
test_cmp expected actual
'
--
2.6.1
next prev parent reply other threads:[~2015-11-14 0:12 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-14 0:10 [PATCH 0/3] Add cleanup for garbage .bitmap files Doug Kelly
2015-11-14 0:10 ` [PATCH 1/3] prepare_packed_git(): find more garbage Doug Kelly
2015-11-14 0:43 ` Stefan Beller
2015-11-14 0:46 ` Doug Kelly
2015-11-14 0:46 ` [PATCH 2/3] t5304: Add test for .bitmap garbage files Doug Kelly
2015-11-14 0:46 ` [PATCH 3/3] gc: Clean garbage .bitmap files from pack dir Doug Kelly
2015-12-15 23:23 ` Jeff King
2015-11-25 18:43 ` [PATCH 1/3] prepare_packed_git(): find more garbage Stefan Beller
2015-11-26 6:15 ` Doug Kelly
2015-12-15 23:09 ` Jeff King
2015-12-15 23:25 ` Jeff King
2015-12-19 0:06 ` [PATCH v3 0/3] " Doug Kelly
2015-12-19 0:06 ` [PATCH 1/3] " Doug Kelly
2015-12-19 0:06 ` [PATCH 2/3] t5304: Add test for .bitmap garbage files Doug Kelly
2015-12-19 0:06 ` [PATCH 3/3] gc: Clean garbage .bitmap files from pack dir Doug Kelly
2015-12-19 2:01 ` Jeff King
2015-12-19 2:02 ` [PATCH v3 0/3] prepare_packed_git(): find more garbage Jeff King
2015-12-19 2:03 ` Jeff King
2016-01-11 16:35 ` Stefan Beller
2016-01-13 17:07 ` [PATCH v4 0/4] gc: Clean garbage .bitmap files from pack dir Doug Kelly
2016-01-13 17:07 ` [PATCH 1/4] prepare_packed_git(): find more garbage Doug Kelly
2016-01-13 17:07 ` [PATCH 2/4] t5304: Add test for .bitmap garbage files Doug Kelly
2016-01-13 20:42 ` Junio C Hamano
2016-01-13 17:07 ` [PATCH 3/4] t5304: Ensure wanted files are not deleted Doug Kelly
2016-01-13 20:55 ` Junio C Hamano
2016-01-18 16:54 ` Doug Kelly
2016-01-19 18:36 ` Junio C Hamano
2016-01-13 17:07 ` [PATCH 4/4] gc: Clean garbage .bitmap files from pack dir Doug Kelly
2015-11-26 6:18 ` [PATCH 1/3] prepare_packed_git(): find more garbage Doug Kelly
2015-11-14 0:47 ` Doug Kelly
2015-11-14 0:10 ` Doug Kelly [this message]
2015-11-14 0:47 ` [PATCH 2/3] t5304: Add test for .bitmap garbage files Stefan Beller
2015-11-14 0:10 ` [PATCH 3/3] gc: Clean garbage .bitmap files from pack dir Doug Kelly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447459853-28838-3-git-send-email-dougk.ff7@gmail.com \
--to=dougk.ff7@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).