4 ms·
There’s been plenty of times my code as been “lost” in a later commit because Git didn’t know it was the same thing.
by luffapi 5y ago
There’s been plenty of times my code as been “lost” in a later commit because Git didn’t know it was the same thing.
- morelisp 5y agoI don't understand how this relates to what I said without more details about what "lost" means, sorry. If you mean Git had issues finding some specific code motion to show in a diff, you can try one of the other diff algorithms, or adjust the threshold for rename/copy detection. AST-based differs would also suffer this issue; a "nice diff" is not a formal problem and does not have a universal solution. If you mean you once had a mis-merge that dropped some code you didn't want to drop, this won't go away with AST-based diffs. It will just happen at the token level instead of the line level. If you mean it's generally hard to deal with collapsing lots of branches with shared history, that's true but would also be true with AST-based approaches. This is the situation something like pijul could help with, but also raises all the other tradeoffs of snapshot vs changeset based approaches.