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

Re: [PATCH 2/2] refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback

From
Stefan Beller <sbeller@google.com>
Date
Jul 18, 2018, 17:07 UTC
Message-ID
<CAGZ79kZyWWivaVgdCt-Zf-_3p9L5fis7ZC73pwDEGNQUfc8f+Q@mail.gmail.com>
In-Reply-To
<6c74aee8-2e18-99de-f775-dced1310809f@gmail.com>
Hi Derrick,
> Overall, I think this is the right approach. The only problem is that
> you're missing a few 'the_repository' to 'r' replacements in the bodies
> of show_reference and register_replace_ref.
Thanks.

Originally I had another approach, which was to convert all callbacks to take a repository argument, and only if the refs backend learned to propagate the correct repository the repo argument would be the specific repo, NULL otherwise.

With that approach it was not possible to replace all occurrences of the_repository with 'r', and it would also be confusing.

But as I pursued that approach at the time of writing this patch... I missed the conversions needed.

Thanks for catching them (and fixing them in the reroll that you just sent out via gitgitgadget)!

Thanks, Stefan

Previous: Derrick StoleeNext: Derrick Stolee
Message 5 of 6 in “RFC ref store to repository migration”
  1. 0/2 RFC ref store to repository migrationStefan Beller, Jul 17, 2018
  2. 1/2 refs.c: migrate internal ref iteration to pass thru repository argumentStefan Beller, Jul 17, 2018
  3. 2/2 refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callbackStefan Beller, Jul 17, 2018
  4. Derrick StoleeJul 18, 2018
  5. Stefan BellerJul 18, 2018
  6. TO-SQUASH: replace the_repository with arbitrary rDerrick Stolee, Jul 18, 2018

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.