gitbutler
gitbutler copied to clipboard
File rename detection does not match git
Version
0.17.6 / nightly
Operating System
macOS
Distribution Method
dmg (Mac OS - Apple Silicon)
Describe the issue
I've encountered a couple of cases now where GitButler's file rename detection does not seem to match Git:
- When a file is moved and there are small changes to it, GitButler (often or always?) does not detect it as a rename but rather as a deletion + addition.
- In https://github.com/gitbutlerapp/gitbutler/pull/10883/commits/ef41b9fc5246bbe322a37d73f891c55927a44dbb, I had deleted
FolderContextMenuandFileContextMenu, and createdChangedFilesContextMenu; the diff fromFileContextMenutoChangedFilesContextMenuwas significantly smaller than fromFolderContextMenutoChangedFilesContextMenu, and thus Git(Hub) detects it as a rename fromFileContextMenutoChangedFilesContextMenu. But GitButler, back then, detected it as a rename fromFolderContextMenu(and a deletion ofFileContextMenu).
The first case might suggest it has something to do with a threshold that's set too high by GitButler, but given the second case, that does not seem true.
How to reproduce (Optional)
No response
Expected behavior (Optional)
No response
Relevant log output (Optional)
Thanks for sharing, along with a commit to try out more subtle cases where the gitoxide implementation of rename tracking disagrees with Git.
This is a known issue, and gitoxide doesn't implemented any of the finesse that Git uses to get better results. But it's nothing that couldn't happen, and I hope one day it will.