Repository navigation
How does file identity survive a rename-plus-edit in the same commit? #1
|
We scan a monorepo where a quarterly refactor keeps renaming directories while editing the moved files. Concretely: one commit both moves From the outside I see the co-change atlas still links the moved file with its old neighbors, so the rename tracking clearly works - but I want to understand the mechanics before I trust it on aggressive histories:
|
Replies: 1 comment
|
Three answers, in order of what actually happens:
|
Three answers, in order of what actually happens:
Identity keys on the name-status stream, with a similarity floor. For
R<NN>records the parser keeps the file identity whenever the recorded similarity clears the floor (currently 50, matching git's own-Mdefault) - below that it degrades to a break: the old path terminates its identity, the new path starts a fresh one. The floor is a parser constant, not a CLI flag yet; if you need a different cut, that is the one line to change, but raise it, never lower it - a low floor is how unrelated files start sharing identity and every downstream metric quietly lies.Churn from a rename+edit commit is attributed to the new path only, as a sin…