~/work/tmp/repo git init . --quiet
~/work/tmp/repo master echo 'foo' > foo.txt
~/work/tmp/repo master? git add .
~/work/tmp/repo master+ git commit -m "create" --quiet
~/work/tmp/repo master mv foo.txt bar.txt # no `git mv`
~/work/tmp/repo master*? git add .
~/work/tmp/repo master+ git status --porcelain
R foo.txt -> bar.txt
~/work/tmp/repo master+ git commit -m "rename"
[master a06c680] rename
1 file changed, 0 insertions(+), 0 deletions(-)
rename foo.txt => bar.txt (100%)
Git knows that the file was renamed even without using git to do the rename. This means that it doesn't matter if you IDE, codemod, agent, or whatever does it. Git tracks that foo.txt and bar.txt refer to the same blob at different revisions.Maybe lore does the same, but the docs imply that it doesn't.
--
To summarize: lore will record relationship metadata only when performed with `lore stage move <from> <to>`, so you will have to intervene if your other tooling moves files.
No it doesn't. Git knows that file A was deleted and file B was created, and if they have the same content then it will guess that it was a rename. But it's a heuristic that doesn't always work. E.g. I think it doesn't try to guess for large diffs, and it doesn't work if you modify the file in the same commit.