All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Turner <dturner@twosigma.com>
Cc: git@vger.kernel.org, peff@peff.net, novalis@novalis.org
Subject: Re: [PATCH v2 1/2] auto gc: don't write bitmaps for incremental repacks
Date: Fri, 23 Dec 2016 13:27:40 -0800	[thread overview]
Message-ID: <xmqq4m1ue3oz.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1482522215-13401-1-git-send-email-dturner@twosigma.com> (David Turner's message of "Fri, 23 Dec 2016 14:43:34 -0500")

David Turner <dturner@twosigma.com> writes:

> +test_expect_success 'auto gc with too many loose objects does not attempt to create bitmaps' '
> +	test_config gc.auto 3 &&
> +	test_config gc.autodetach false &&
> +	test_config pack.writebitmaps true &&
> +	# We need to create two object whose sha1s start with 17
> +	# since this is what git gc counts.  As it happens, these
> +	# two blobs will do so.
> +	test_commit 263 &&
> +	test_commit 410 &&
> +	# Our first gc will create a pack; our second will create a second pack
> +	git gc --auto &&
> +	ls .git/objects/pack |grep -v bitmap >existing_packs &&

Missing SP (compare with the second invocation of the same).

> +	test_commit 523 &&
> +	test_commit 790 &&
> +
> +	git gc --auto 2>err &&
> +	test_i18ngrep ! "^warning:" err &&
> +	ls .git/objects/pack/ | grep -v bitmap >post_packs &&
> +	! test_cmp existing_packs post_packs

This does not look good for two reasons.  test_cmp tries to
highlight test breakage by being verbose when two files are
different while keeping quiet when they are the same.  Running it
with "!" does not change its expectation.  This undesirable effect
should be visible when this test is run with "-v" option.

Another is that this only tests if the set of packs before and after
are different.  I think you are expecting that the second invocation
will create a new one while leaving the old one intact but this test
will not catch a breakage if the second repack instead created just
one pack replacing the old one.

> +'
> +
> +
>  test_done

Thanks.

  parent reply	other threads:[~2016-12-23 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23 19:43 [PATCH v2 1/2] auto gc: don't write bitmaps for incremental repacks David Turner
2016-12-23 19:43 ` [PATCH v2 2/2] repack: die on incremental + write-bitmap-index David Turner
2016-12-23 22:20   ` Jeff King
2016-12-23 21:27 ` Junio C Hamano [this message]
2016-12-23 22:12 ` [PATCH v2 1/2] auto gc: don't write bitmaps for incremental repacks Jeff King

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4m1ue3oz.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=dturner@twosigma.com \
    --cc=git@vger.kernel.org \
    --cc=novalis@novalis.org \
    --cc=peff@peff.net \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.