Re: [RFC/PATCH v2] patch-ids: cache patch IDs in a notes tree
- From
John Keeping <john@keeping.me.uk>
- Date
- May 12, 2013, 11:57 UTC
- Message-ID
- <20130512115743.GJ2299@serenity.lan>
- In-Reply-To
- <20130512114131.GI2299@serenity.lan>
On Sun, May 12, 2013 at 12:41:31PM +0100, John Keeping wrote:
Show 17 quoted lines
> diff --git a/t/t6007-rev-list-cherry-pick-file.sh b/t/t6007-rev-list-cherry-pick-file.sh > index 28d4f6b..378cf3e 100755 > --- a/t/t6007-rev-list-cherry-pick-file.sh > +++ b/t/t6007-rev-list-cherry-pick-file.sh > @@ -207,4 +207,20 @@ test_expect_success '--count --left-right' ' > test_cmp expect actual > ' > > +cat >expect <<EOF > +3 2 0 > +EOF > + > +test_expect_success 'rev-list --cherry-mark caches patch ids' ' > + test_config patchid.cacheref patchids && > + git rev-list --cherry-mark --left-right --count F...E >actual && > + test_cmp expect actual && > + git notes --ref patchids show master >cached_master &&
I forgot to update this test, it needs a "| sed -e 1q" in the middle of this line to make sure that we're only checking the patch ID and not the diffopts hash and Git version.
Show 8 quoted lines
> + git log -p -1 master | git patch-id | sed -e "s/ .*//" >patch-id_master && > + test_cmp patch-id_master cached_master && > + # Get the patch IDs again, now they should be cached > + git rev-list --cherry-mark --left-right --count F...E >actual && > + test_cmp expect actual > +' > + > test_done