[PATCH 2/3] t5304: Add test for .bitmap garbage files
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--- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] t5304: Add test for .bitmap garbage files
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--- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] t5304: Add test for .bitmap garbage files
On Fri, Nov 13, 2015 at 4:10 PM, Doug Kellywrote: > 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 > --- > 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 Do we want to split that up further, into no corresponding .idx and .pack:... to tell that actually both files are missing and we know it? > 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 Wondering if we can condense this into one message (because only one pack is missing). > +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 same here. no corresponding .pack: .git/objects/pack/fake6.{keep,idx, bitmap} would look nice and be shell compatible. (rm on that multi path just works, in case you expect the pack to be gone) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] t5304: Add test for .bitmap garbage files
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--- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html