From: Kristoffer Haugsbakk Date: Sun, 23 Apr 2023 21:01:25 GMT Subject: Re: Proposal: tell git a file has been renamed Message-ID: In-Reply-To: <8fe188a9-c01f-9fb5-5877-8ff508094b22@game-point.net> On Sat, Apr 22, 2023, at 20:01, Jeremy Morton wrote: > Could a command be added to git that means you tell Git that counts as > a file rename? Git would add a marker to the staging area that the > file has been renamed, and upon commit, would first generate an > additional commit for each rename before generating the main commit, > ensuring the rename operation counts as an actual rename, and the > content's history is maintained. I don’t see the (conceptual) problem with a modification of this as a history rewriting tool: • Given a series of commits: • Tool X modifies all the commits so that the default similarity index for tools like git-log(1) is triggered on intended file renames • The user will be probably be prompted with a list of initial potential renames and then will • Keep the intended renames • Remove the not-intended renames • Add the additional renames But this looks like something that a third-party tool could implement. -- Kristoffer Haugsbakk