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

[RFC PATCH 0/2] First steps towards iterating over submodule refs

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Aug 25, 2021, 23:23 UTC
Message-ID
<cover.1629933380.git.jonathantanmy@google.com>

Here are more results from my submodule partial clone work - teaching ref iteration to work with submodules by introducing struct repo parameters at different points. I'm sending this out early as RFC (before implementing the part that actually adds support for other repositories) because there might be a better way to do this that I haven't thought of. (This patch set contains my best idea for how this could be implemented, but admittedly it is a bit unelegant that the repo parameter is injected differently into each iterator function.)

This will break any existing topic that introduces new ref store backends (Han-Wen cc-ed for reftable), although I think that the changes introduced here are not too significant.

Jonathan Tan (2):
  refs: make _advance() check struct repo, not flag
  refs: add repo paramater to _iterator_peel()
 refs.c                | 50 +++++++++++++++++++++++-------------------
 refs/debug.c          | 13 ++++++-----
 refs/files-backend.c  | 31 ++++++++++++++++++--------
 refs/iterator.c       | 38 ++++++++++++++++++++++++--------
 refs/packed-backend.c | 30 ++++++++++++++++---------
 refs/ref-cache.c      |  7 +++---
 refs/refs-internal.h  | 51 +++++++++++++++++++++++++++++--------------
 7 files changed, 144 insertions(+), 76 deletions(-)
-- 
2.33.0.rc2.250.ged5fa647cd-goog
Next: Jonathan Tan
Message 1 of 11 in “First steps towards iterating over submodule refs”
  1. 0/2 First steps towards iterating over submodule refsJonathan Tan, Aug 25, 2021
  2. 1/2 refs: make _advance() check struct repo, not flagJonathan Tan, Aug 25, 2021
  3. Han-Wen NienhuysAug 26, 2021
  4. Jonathan TanAug 26, 2021
  5. Glen ChooSep 14, 2021
  6. Han-Wen NienhuysSep 15, 2021
  7. Jonathan TanSep 16, 2021
  8. Junio C HamanoSep 16, 2021
  9. Jonathan TanSep 16, 2021
  10. Jonathan TanSep 16, 2021
  11. 2/2 refs: add repo paramater to _iterator_peel()Jonathan Tan, Aug 25, 2021

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.