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

Re: [PATCH 1/3] repository: create disable_replace_refs()

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 1, 2023, 05:23 UTC
Message-ID
<xmqq1qiveoy3.fsf@gitster.g>
In-Reply-To
<56544abc15d1fce6fb4a0946e709470af9225395.1685126618.git.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 17 quoted lines
> From: Derrick Stolee <derrickstolee@github.com>
>
> Several builtins depend on being able to disable the replace references
> so we actually operate on each object individually. These currently do
> so by directly mutating the 'read_replace_refs' global.
>
> A future change will move this global into a different place, so it will
> be necessary to change all of these lines. However, we can simplify that
> transition by abstracting the purpose of these global assignments with a
> method call.
>
> We will never scope this to an in-memory repository as we want to make
> sure that we never use replace refs throughout the life of the process
> if this method is called.
>
> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
> ---

It will naturally be outside the scope of the series, but this change will allow us to add a sanity check to make sure that nobody has read objects that would have been affected by these replace refs before the disable call was made, which is another reason to welcome this change.

Previous: Jeff KingNext: Victoria Dye
Message 8 of 32 in “Create stronger guard rails on replace refs”
  1. 0/3 Create stronger guard rails on replace refsDerrick Stolee via GitGitGadget, May 26, 2023
  2. 1/3 repository: create disable_replace_refs()Derrick Stolee via GitGitGadget, May 26, 2023
  3. Elijah NewrenMay 31, 2023
  4. Derrick StoleeMay 31, 2023
  5. Jeff KingJun 1, 2023
  6. Junio C HamanoJun 3, 2023
  7. Jeff KingJun 4, 2023
  8. Junio C HamanoJun 1, 2023
  9. Victoria DyeJun 1, 2023
  10. 2/3 replace-objects: create wrapper around settingDerrick Stolee via GitGitGadget, May 26, 2023
  11. Victoria DyeJun 1, 2023
  12. Derrick StoleeJun 1, 2023
  13. Elijah NewrenJun 3, 2023
  14. Derrick StoleeJun 5, 2023
  15. 3/3 repository: create read_replace_refs settingDerrick Stolee via GitGitGadget, May 26, 2023
  16. Victoria DyeJun 1, 2023
  17. Derrick StoleeJun 1, 2023
  18. Elijah NewrenMay 31, 2023
  19. 0/3 Create stronger guard rails on replace refsDerrick Stolee via GitGitGadget, Jun 2, 2023
  20. 1/3 repository: create disable_replace_refs()Derrick Stolee via GitGitGadget, Jun 2, 2023
  21. 2/3 replace-objects: create wrapper around settingDerrick Stolee via GitGitGadget, Jun 2, 2023
  22. René ScharfeJun 3, 2023
  23. Derrick StoleeJun 5, 2023
  24. 3/3 repository: create read_replace_refs settingDerrick Stolee via GitGitGadget, Jun 2, 2023
  25. Victoria DyeJun 5, 2023
  26. Elijah NewrenJun 3, 2023
  27. 0/3 Create stronger guard rails on replace refsDerrick Stolee via GitGitGadget, Jun 6, 2023
  28. 1/3 repository: create disable_replace_refs()Derrick Stolee via GitGitGadget, Jun 6, 2023
  29. 2/3 replace-objects: create wrapper around settingDerrick Stolee via GitGitGadget, Jun 6, 2023
  30. 3/3 repository: create read_replace_refs settingDerrick Stolee via GitGitGadget, Jun 6, 2023
  31. Victoria DyeJun 6, 2023
  32. Junio C HamanoJun 12, 2023

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.