News for hackers. Stuff that matters.
Re:Ask HN: Can we do better than Git for version control? by blibble on Sunday December 10, 2023 @12:32PM (#38593187)
the rename won't be in your history because the tree and commit objects don't support renames

the tooling infers a rename based on the lack of a content change

Re:Ask HN: Can we do better than Git for version control? by trevyn on Sunday December 10, 2023 @02:13PM (#38593994)
Is there a difference?
Re:Ask HN: Can we do better than Git for version control? by phyzome on Sunday December 10, 2023 @04:12PM (#38595101)
Absolutely. In a move-and-edit situation, git will sometimes infer a rename and sometimes not, based on your local version of git, your settings, and the details of the edit. If inference fails, you may have a harder time resolving merge conflicts, performing cherry-picks, etc.
Re:Ask HN: Can we do better than Git for version control? by trevyn on Friday December 15, 2023 @04:38AM (#38652538)
So just make sure the moves and edits are in separate commits?
Re:Ask HN: Can we do better than Git for version control? by phyzome on Sunday December 17, 2023 @08:38AM (#38672754)
Yes, that's the standard workaround.
Re:Ask HN: Can we do better than Git for version control? by dafelst on Sunday December 10, 2023 @05:54PM (#38595865)
Absolutely, the inference is based on a set of heuristics and is often just plain wrong.
Re:Ask HN: Can we do better than Git for version control? by rendall on Monday December 11, 2023 @09:43AM (#38601054)
I've had one or two really annoying merges that were complicated by these renames. TIL thanks to these responses that it's not actually a rename.