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

Re: [PATCH] revision: ignore non-existent objects in resolve-undo list

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 18, 2022, 16:40 UTC
Message-ID
<xmqqbkq9ulum.fsf@gitster.g>
In-Reply-To
<xmqqfsflum70.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
>> Fix the error by emitting a warning when the resolve-undo list mentions
>> objects that do not exist and then ignoring the nonexistent object.
>
> ... this approach is about.  I think it is backwards to sweep the
> problem under the rug without fixing the underlying problem.
>
> We should instead be removing the reference that is no longer even
> usable for the purpose of resolve-undo, e.g. when "rerere forget
> <pathspec>" reads from the resolve-undo extension to recreate the
> conflicts.
Ah, I take half of it back.  "instead" -> "in addition".

The patch corresponds to revision.c::handle_one_reflog_commit() that skips the object referenced by a reflog entry that no longer exists as part of the solution to the same problem as "reflog --stale-fix" solved, and needs to be an integral half of the solution to the "older gc lose blobs referenced by resolve-undo extension" problem.

And the patch goes in the right direction. It is a bit sad that it now has to do parse_object() but in the normal case, the object referenced should be a blob that exists, for which the cost of parsing it would be none (just setting .parsed member to true), so it should be OK.

Thanks.  Will queue.
Previous: Junio C HamanoNext: Jeff King
Message 3 of 4 in “revision: ignore non-existent objects in resolve-undo list”
  1. revision: ignore non-existent objects in resolve-undo listMathias Rav, Oct 18, 2022
  2. Junio C HamanoOct 18, 2022
  3. Junio C HamanoOct 18, 2022
  4. Jeff KingOct 18, 2022

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.