Subject: Re: Proposal: tell git a file has been renamed

From: Junio C Hamano <[email-masked]>
Date: Mon, 24 Apr 2023 11:26:54 -0700

Jeremy Morton <[email-masked]> writes:

> Could a command be added to git that means you tell Git that counts as
> a file rename?

Telling Git is the easy part.  How to make it honor what it was told
earlier is harder.

I recall that there was an idea about recording similarity index
between two blobs precomputed so that the same pair of blobs do not
have to be computed over and over again, when you do "git log -M"?

An obvious way to implement this "I know HEAD^:path1 and HEAD:path2
are similar enough that they deserve to be called a rename" can be
to invalidate and then contaminate such a similarity cache with
end-user supplied data.