> On Apr 18, 2024, at 1:41 PM, Dan Cross <cro...@gmail.com> wrote:
> 
> Git and Jujitsu are, frankly, superior.

Aha, I had never heard of Jujutsu until now; you mean 
https://martinvonz.github.io/jj/ right?  Monitoring file changes and treating 
changes to the working copy as an implicit work-in-progress commit sounds like 
a good idea, good for filesystem-integrated revision control.  In my usual 
markdown editor that I use for notes (https://github.com/ec1oud/nettebook) I’m 
planning to add UI for making git commits.  I suppose prompting for a 
customized commit message would still be a good idea, but otherwise getting 
commits automatically without needing to add that as an application feature or 
remembering to do it on the command line might be a good feature.

Interesting that it's Rust.  Just another reason to eventually have Rust on 
Plan 9…

For prose purposes (especially auto-wrapped Markdown) it bothers me that git 
diff mainly does line diffs.  So I’ve been trying to find an efficient 
algorithm for word diffs.  (Yes there is git diff --word-diff, but for an 
application to show this graphically, I’m not a big fan of running a separate 
process for it.  And the output needs parsing anyway.)  It seems a common 
technique is the facepalm one: turn every space into a newline and then do line 
diffs.  But there’s another old Bell project: 
https://github.com/HaikuArchives/Spiff.git  It’s kindof ugly code and with lots 
of comments about how inefficient it is, but at least it starts by tokenizing 
and then working with word lists in memory instead of character substitution.  
So I’m working on a fork to try to turn it into a library (will see if that’s 
worthwhile or just leads to a sufficient understanding of the algorithm that 
I’d rather start over).  But this could also be the sort of thing Jujutsu could 
improve upon, I suppose.


------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tab2715b0e6f3e0a5-M3ce44eda7af52e08323343b1
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to