News for hackers. Stuff that matters.
Re:Twenty Years Is Nothing by 0xfffafaCrash on Monday March 04, 2024 @05:26AM (#39588855)
Text is too broad a category for version control for software to be convenient. I would much prefer version controlling on a subset of text that correctly parses to a domain specific AST. Imagine how much better and informative the diffs and conflict resolution and blames would be. Also imagine moving code across files, e.g. by splitting them and actually having your version control understand that. You could probably push bisects and the like to new levels.
Re:Twenty Years Is Nothing by PhilipRoman on Monday March 04, 2024 @06:59AM (#39589403)
Git's model of snapshot-only storage actually facilitates this quite well. All you need it a custom difftool and a custom mergetool which understands syntax. You also get graceful fallback to textual diffs when your cozy dev environment inevitably encounters the real world.
Re:Twenty Years Is Nothing by giancarlostoro on Monday March 04, 2024 @07:23AM (#39589561)
If someone took the time to build such a tool and put a price tag on it and made it intuitive they would probably make a lot of money.
Re:Twenty Years Is Nothing by dagw on Monday March 04, 2024 @06:52AM (#39589342)
At the same time text is to narrow a category to cover many project needs. There are lots of projects where needing manage and version GBs of various binary data is vital. Git defaulting everything being plain text will miss out a lot of special cases where are more specialised tool might help, but on the whole is probably a good balance and 'good enough' for the vast majority of use cases.
Re:Twenty Years Is Nothing by dagw on Monday March 04, 2024 @09:05AM (#39590625)
That being said, if you want to build a git 'competitor' one of these two avenues can probably offer plenty of interesting opportunities.
Re:Twenty Years Is Nothing by thworp on Monday March 04, 2024 @09:03AM (#39590598)
One could probably build a MVP for this by using tree-sitter parsing, re-injecting identifiers if that is wanted, and then commiting the results to git via a commit hook.