From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Taylor Blau <me@ttaylorr.com>
Subject: [PATCH 0/6] refs/reftable: wire up exclude patterns
Date: Mon, 9 Sep 2024 13:31:30 +0200 [thread overview]
Message-ID: <cover.1725881266.git.ps@pks.im> (raw)
Hi,
this patch series wires up exclude patterns for the reftable backend.
Exclude patterns allow the backend to skip references internally that
match a specific pattern. This avoids having to read references that the
caller would discard immediately anyway.
The series is structured as follows:
- Patches 1 and 2 fix two separate bugs in how we currently handle
exclude patterns in combination with namespaces. We didn't happen to
stumble over these bugs before because exclude patterns are only
implemented for the "packed" backend. But once you start to pack
refs we exclude references based on their full name instead of the
name with the prefixed stripped. For the reftable backend we'd
always hit those bugs because it always uses exclude patterns when
passed.
- Patches 3 to 5 wire up proper re-seeking of reftable iterators and
adds some tests to demonstrate that this works as expected. This is
a prerequisite for handling exclude patterns.
- Patch 6 wires up exclude patterns in the reftable backend by
re-seeking iterators once we hit an excluded reference.
Thanks!
Patrick
Patrick Steinhardt (6):
refs: properly apply exclude patterns to namespaced refs
builtin/receive-pack: fix exclude patterns when announcing refs
Makefile: stop listing test library objects twice
t/unit-tests: introduce reftable library
reftable/reader: make table iterator reseekable
refs/reftable: wire up support for exclude patterns
Makefile | 8 +-
builtin/receive-pack.c | 18 ++-
refs.c | 35 +++++-
refs.h | 9 ++
refs/reftable-backend.c | 125 ++++++++++++++++++++-
reftable/reader.c | 1 +
t/t1419-exclude-refs.sh | 33 ++++--
t/t5509-fetch-push-namespaces.sh | 9 ++
t/unit-tests/lib-reftable.c | 93 ++++++++++++++++
t/unit-tests/lib-reftable.h | 20 ++++
t/unit-tests/t-reftable-merged.c | 163 +++++++++++++++-------------
t/unit-tests/t-reftable-reader.c | 96 ++++++++++++++++
t/unit-tests/t-reftable-readwrite.c | 130 +++++++---------------
t/unit-tests/t-reftable-stack.c | 25 ++---
trace2.h | 1 +
trace2/tr2_ctr.c | 5 +
16 files changed, 570 insertions(+), 201 deletions(-)
create mode 100644 t/unit-tests/lib-reftable.c
create mode 100644 t/unit-tests/lib-reftable.h
create mode 100644 t/unit-tests/t-reftable-reader.c
--
2.46.0.519.g2e7b89e038.dirty
next reply other threads:[~2024-09-09 11:31 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 11:31 Patrick Steinhardt [this message]
2024-09-09 11:31 ` [PATCH 1/6] refs: properly apply exclude patterns to namespaced refs Patrick Steinhardt
2024-09-13 11:35 ` karthik nayak
2024-09-16 6:56 ` Patrick Steinhardt
2024-09-09 11:31 ` [PATCH 2/6] builtin/receive-pack: fix exclude patterns when announcing refs Patrick Steinhardt
2024-09-13 11:50 ` karthik nayak
2024-09-09 11:31 ` [PATCH 3/6] Makefile: stop listing test library objects twice Patrick Steinhardt
2024-09-09 11:31 ` [PATCH 4/6] t/unit-tests: introduce reftable library Patrick Steinhardt
2024-09-09 11:31 ` [PATCH 5/6] reftable/reader: make table iterator reseekable Patrick Steinhardt
2024-09-13 12:11 ` karthik nayak
2024-09-16 6:56 ` Patrick Steinhardt
2024-09-17 16:44 ` karthik nayak
2024-09-09 11:31 ` [PATCH 6/6] refs/reftable: wire up support for exclude patterns Patrick Steinhardt
2024-09-13 12:47 ` karthik nayak
2024-09-16 6:56 ` Patrick Steinhardt
2024-09-17 17:31 ` karthik nayak
2024-09-13 12:48 ` [PATCH 0/6] refs/reftable: wire up " karthik nayak
2024-09-16 6:56 ` Patrick Steinhardt
2024-09-16 8:49 ` [PATCH v2 " Patrick Steinhardt
2024-09-16 8:50 ` [PATCH v2 1/6] refs: properly apply exclude patterns to namespaced refs Patrick Steinhardt
2024-09-17 9:12 ` Taylor Blau
2024-09-17 9:33 ` Patrick Steinhardt
2024-09-17 9:38 ` Taylor Blau
2024-09-17 9:44 ` Patrick Steinhardt
2024-09-17 9:52 ` Taylor Blau
2024-09-17 9:55 ` Patrick Steinhardt
2024-09-16 8:50 ` [PATCH v2 2/6] builtin/receive-pack: fix exclude patterns when announcing refs Patrick Steinhardt
2024-09-17 9:16 ` Taylor Blau
2024-09-16 8:50 ` [PATCH v2 3/6] Makefile: stop listing test library objects twice Patrick Steinhardt
2024-09-16 8:50 ` [PATCH v2 4/6] t/unit-tests: introduce reftable library Patrick Steinhardt
2024-09-16 8:50 ` [PATCH v2 5/6] reftable/reader: make table iterator reseekable Patrick Steinhardt
2024-09-16 8:50 ` [PATCH v2 6/6] refs/reftable: wire up support for exclude patterns Patrick Steinhardt
2024-09-17 9:26 ` Taylor Blau
2024-09-17 9:39 ` Patrick Steinhardt
2024-09-17 9:53 ` Taylor Blau
2024-09-17 17:33 ` [PATCH v2 0/6] refs/reftable: wire up " karthik nayak
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=cover.1725881266.git.ps@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.com \
/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 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 NNTP newsgroup(s).