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

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

From
Jeff King <peff@peff.net>
Date
Jun 4, 2023, 06:32 UTC
Message-ID
<20230604063206.GB47137@coredump.intra.peff.net>
In-Reply-To
<xmqqa5xh8k4i.fsf@gitster.g>
On Sat, Jun 03, 2023 at 09:28:13AM +0900, Junio C Hamano wrote:
Show 13 quoted lines
> I agree with the "devil's advocate" above; indeed my suggestion to
> follow-on work that is enabled by introducing this function, i.e. we
> can ensure that the objects already instantiated when the call is
> made are not affected by the replace mechanism, was exactly for such
> a "we already accessed some objects via the replace mechanism and
> then try to close the door of the barn afterwards with this call"
> case.
> 
> Indeed, I think "git branch --no-merged 0369cf" resolves the object
> name down to a commit object in parse_opt_merge_filter() before
> parse_options() call returns.
> 
> Yes.

Ah, very good example. Yes, I'd think it would be appropriate to BUG() if disable_replace_refs() is called and anybody has looked up an object already.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 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.