Aha: Improving the git-diff and git-node-history commands

14 views
Skip to first unread message

Edward K. Ream

unread,
Jul 12, 2023, 12:00:37 PM7/12/23
to leo-editor

Leo's git-diff command provides a node-oriented diff. I use this command constantly.


In an earlier post, I mentioned a telltale signal that a node's gnx has changed: git-diff reports a pair of nodes, one added, the other deleted. The gnx definitely has changed if both nodes have the same contents. The gnx may have changed if the headlines are the same, but the bodies differ.


Aha! git-diff can detect this pattern! Doh! I should have thought of this before :-)


This Aha will improve git-diff slightly. The command will replace pairs of added/deleted nodes with a single node describing the changed gnxs.


Summary


The Aha is essential for git-node-history. This command must track nodes' history reliably, even when their gnxs change. The Aha shows how.


Edward

Reply all
Reply to author
Forward
0 new messages