All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH] fast-import: avoid making replace refs point to themselves
Date: Fri, 15 Nov 2024 10:08:04 +0900	[thread overview]
Message-ID: <xmqqv7wp483v.fsf@gitster.g> (raw)
In-Reply-To: <xmqqzfm149sv.fsf@gitster.g> (Junio C. Hamano's message of "Fri, 15 Nov 2024 09:31:28 +0900")

Junio C Hamano <gitster@pobox.com> writes:

> I am not sure if a warning is even warranted.  If you decide to
> replace an object A with the same object A, the result ought to be a
> no-op.  I wonder if it is makes more sense to
>
>  (1) do this unconditionally and silently, and
>  (2) when we prepare the replace_map, ignore self-referencing ones.
>
> instead.  If (2) makes sense entirely depends on the answer of an
> earlier question (i.e. "is there a reason why self-reference is more
> common than general loop?").

Forgot to add.  (1) could be done even at a lower layer, i.e. the
ref API could be told to reject such a replace ref creation/update
that maps an object name to itself.

  reply	other threads:[~2024-11-15  1:08 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 [this message]
2024-11-15  3:41     ` Elijah Newren
2024-11-15  3:51       ` Junio C Hamano
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=xmqqv7wp483v.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.