From: Junio C Hamano <gitster@pobox.com>
To: Mathias Rav <m@git.strova.dk>
Cc: git@vger.kernel.org, peff@peff.net, pwagland@gmail.com
Subject: Re: [PATCH] revision: ignore non-existent objects in resolve-undo list
Date: Tue, 18 Oct 2022 09:40:01 -0700 [thread overview]
Message-ID: <xmqqbkq9ulum.fsf@gitster.g> (raw)
In-Reply-To: <xmqqfsflum70.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 18 Oct 2022 09:32:35 -0700")
Junio C Hamano <gitster@pobox.com> writes:
>> 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.
next prev parent reply other threads:[~2022-10-18 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 15:55 [PATCH] revision: ignore non-existent objects in resolve-undo list Mathias Rav
2022-10-18 16:32 ` Junio C Hamano
2022-10-18 16:40 ` Junio C Hamano [this message]
2022-10-18 20:29 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbkq9ulum.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=m@git.strova.dk \
--cc=peff@peff.net \
--cc=pwagland@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).