git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 0/2] refs: introduce reftable backend

From
Patrick Steinhardt <ps@pks.im>
Date
Feb 5, 2024, 06:02 UTC
Message-ID
<cover.1707109509.git.ps@pks.im>
In-Reply-To
<cover.1706601199.git.ps@pks.im>
Hi,

this is the third version of my patch series that introduces the reftable backend.

The only real change in this version is that I've pulled in kn/for-all-refs at 693e807311 (for-each-ref: avoid filtering on empty pattern, 2024-01-29) as a dependency. This series introduces a new DO_FOR_EACH_INCLUDE_ALL_REFS flag that we need to handle in the reftable backend. With this change all tests should pass again.

Patrick
Patrick Steinhardt (2):
  refs: introduce reftable backend
  ci: add jobs to test with the reftable backend
 .github/workflows/main.yml                    |    9 +
 .gitlab-ci.yml                                |    9 +
 Documentation/ref-storage-format.txt          |    2 +
 .../technical/repository-version.txt          |    5 +-
 Makefile                                      |    1 +
 ci/lib.sh                                     |    2 +-
 ci/run-build-and-tests.sh                     |    3 +
 contrib/workdir/git-new-workdir               |    2 +-
 path.c                                        |    2 +-
 path.h                                        |    1 +
 refs.c                                        |    1 +
 refs/refs-internal.h                          |    1 +
 refs/reftable-backend.c                       | 2297 +++++++++++++++++
 repository.h                                  |    5 +-
 t/t0610-reftable-basics.sh                    |  887 +++++++
 t/t0611-reftable-httpd.sh                     |   26 +
 t/test-lib.sh                                 |    2 +
 17 files changed, 3248 insertions(+), 7 deletions(-)
 create mode 100644 refs/reftable-backend.c
 create mode 100755 t/t0610-reftable-basics.sh
 create mode 100755 t/t0611-reftable-httpd.sh
Range-diff against v2:
1:  d6548dcfad ! 1:  d83e66e980 refs: introduce reftable backend
    @@ refs/reftable-backend.c (new)
     +{
     +	switch (log->value_type) {
     +	case REFTABLE_LOG_UPDATE:
    -+		/* when we write log records, the hashes are owned by a struct
    -+		 * oid */
    ++		/*
    ++		 * When we write log records, the hashes are owned by the
    ++		 * caller and thus shouldn't be free'd.
    ++		 */
     +		log->value.update.old_hash = NULL;
     +		log->value.update.new_hash = NULL;
     +		break;
    @@ refs/reftable-backend.c (new)
     +			break;
     +
     +		/*
    -+		 * The files backend only lists references contained in
    -+		 * "refs/". We emulate the same behaviour here and thus skip
    -+		 * all references that don't start with this prefix.
    ++		 * Unless DO_FOR_EACH_INCLUDE_ALL_REFS is set, we only list
    ++		 * refs starting with "refs/" to mimic the "files" backend.
     +		 */
    -+		if (!starts_with(iter->ref.refname, "refs/"))
    ++		if (!(iter->flags & DO_FOR_EACH_INCLUDE_ALL_REFS) &&
    ++		    !starts_with(iter->ref.refname, "refs/"))
     +			continue;
     +
     +		if (iter->prefix &&
2:  63eafc9f5b = 2:  146bb95c03 ci: add jobs to test with the reftable backend
-- 
2.43.GIT
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 14 of 23 in “refs: introduce reftable backend”
  1. 0/2 refs: introduce reftable backendPatrick Steinhardt, Jan 30, 2024
  2. 1/2 refs: introduce reftable backendPatrick Steinhardt, Jan 30, 2024
  3. Karthik NayakFeb 1, 2024
  4. Patrick SteinhardtFeb 2, 2024
  5. Patrick SteinhardtFeb 2, 2024
  6. 2/2 ci: add jobs to test with the reftable backendPatrick Steinhardt, Jan 30, 2024
  7. Junio C HamanoJan 30, 2024
  8. 0/2 refs: introduce reftable backendPatrick Steinhardt, Feb 2, 2024
  9. 1/2 refs: introduce reftable backendPatrick Steinhardt, Feb 2, 2024
  10. 2/2 ci: add jobs to test with the reftable backendPatrick Steinhardt, Feb 2, 2024
  11. Karthik NayakFeb 2, 2024
  12. Junio C HamanoFeb 3, 2024
  13. Patrick SteinhardtFeb 4, 2024
  14. 0/2 refs: introduce reftable backendPatrick Steinhardt, Feb 5, 2024
  15. 1/2 refs: introduce reftable backendPatrick Steinhardt, Feb 5, 2024
  16. 2/2 ci: add jobs to test with the reftable backendPatrick Steinhardt, Feb 5, 2024
  17. Karthik NayakFeb 5, 2024
  18. 0/2 refs: introduce reftable backendPatrick Steinhardt, Feb 7, 2024
  19. 1/2 refs: introduce reftable backendPatrick Steinhardt, Feb 7, 2024
  20. Jeff KingFeb 7, 2024
  21. Patrick SteinhardtFeb 8, 2024
  22. Jeff KingFeb 15, 2024
  23. 2/2 ci: add jobs to test with the reftable backendPatrick Steinhardt, Feb 7, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.