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

Re: Bug report: git branch behaves as if --no-replace-objects is passed

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 30, 2021, 21:53 UTC
Message-ID
<xmqqa6qkcnqa.fsf@gitster.g>
In-Reply-To
<CABPp-BEE0eksCJSAviDh5GyqsOu=i_mW3VY6SEULa4kx0NsUMg@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
> Using your own words:
>
> "the replace mechanism is about telling Git: when anybody refers to
> deadbeef, use its replacement if defined instead."

"When anybody wants the contents of deadbeef, give the contents of its replacement" is what the replace (graft, too) is.

> git branch didn't do that; it put deadbeef into refs/heads/foobar.

Yes, but refs/heads/foobar having deadbeef does not have a problem, as long as you get the contents of the replacement object when you ask for the contents of deadbeef (or "the object referred to by the refs/heads/foobar ref").

Previous: Junio C HamanoNext: Elijah Newren
Message 7 of 10 in “Bug report: git branch behaves as if --no-replace-objects is passed”
  1. Elijah NewrenMar 30, 2021
  2. Jeff KingMar 30, 2021
  3. Junio C HamanoMar 30, 2021
  4. Elijah NewrenMar 30, 2021
  5. Elijah NewrenMar 30, 2021
  6. Junio C HamanoMar 30, 2021
  7. Junio C HamanoMar 30, 2021
  8. Elijah NewrenMar 30, 2021
  9. Junio C HamanoMar 30, 2021
  10. Elijah NewrenMar 31, 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.