From: Johannes Sixt Date: Sat, 02 May 2026 07:25:16 GMT Subject: Re: git rename/moved status unreliable in ruby Message-ID: <157dd2e5-ce64-4654-a66a-86a552c7c9f1@kdbg.org> In-Reply-To: <026b84f4-7052-4d5b-a9ae-c2487569d1ee@gmail.com> Am 01.05.26 um 17:30 schrieb Phillip Wood: > Rename detection is based on how similar the two files are. Looking at > the example you linked to below you're changing a file that looks like > > ... > > Which means that git sees that every line has changed because the > indentation has changed. That's correct, of course, but... > If you want git to realize that the file has > been renamed you could move it in one commit and then add modify it in > the next commit. ... this is a fallacy. Splitting into two commits helps only certain cases, in particular, when the commit that moves the files is compared to an earlier commit, such as `git log` does. However, if a commit after the change is compared to a commit before the move, the rename is still not detected. -- Hannes