From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] fast-import: avoid making replace refs point to themselves
Date: Fri, 15 Nov 2024 12:51:46 +0900 [thread overview]
Message-ID: <xmqqjzd540j1.fsf@gitster.g> (raw)
In-Reply-To: <CABPp-BGOLfeUn6H3cdeMf5tZ1gswoaR51J+PDhMB4akR3jG+LA@mail.gmail.com> (Elijah Newren's message of "Thu, 14 Nov 2024 19:41:00 -0800")
Elijah Newren <newren@gmail.com> writes:
> ... If the repository
> had a value for the replace ref before fast-import was run, and the
> replace ref was explicitly named in the fast-import stream, I don't
> want the replace ref to be left with a pre-fast-import value.
Ah, right. We want to honor the user's latest wish, i.e., if they
create a replace ref that maps A to A, when they ask for object A,
instead of returning it, we need to return what the replace ref
refers to, which happens to be object A. So you are right. "You are
trying to map A to A, so we'll ignore that request" is a wrong thing
to do. "In order to give you A when you ask for A, we will remove
the existing mapping for A" is absolutely the right thing to do,
which is what your patch does.
Thanks.
next prev parent reply other threads:[~2024-11-15 3:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 18:47 [PATCH] fast-import: avoid making replace refs point to themselves Elijah Newren via GitGitGadget
2024-11-15 0:31 ` Junio C Hamano
2024-11-15 1:08 ` Junio C Hamano
2024-11-15 3:41 ` Elijah Newren
2024-11-15 3:51 ` Junio C Hamano [this message]
2024-11-15 3:15 ` Elijah Newren
2024-11-18 22:19 ` [PATCH v2] " Elijah Newren via GitGitGadget
2024-11-19 0:44 ` Junio C Hamano
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=xmqqjzd540j1.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=newren@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