On Wed, Jun 14, 2017 at 9:31 AM, Edward K. Ream <[email protected]> wrote:

For several years I've wondered if there was a way to show outline-oriented
> diffs more clearly.  Doh! Leo already has a way.  After changing files
> outside of Leo, say by using git revert/reset/checkout, Leo creates
> "Recovered Nodes" nodes when opening the file.
>

​Yesterday I got sidetracked in implementation details. To summarize, git
itself can deliver all needed data to Leo using subprocess. There is no
need for gitpython, which is good, because gitpython is slow and difficult
to install.

*Simple prototype*

My current thinking about the user interface is to create an
outline-oriented analog of gitk within Leo.  This may be easier than it
sounds!

The idea is to create a top-level "Diff" node in Leo, with child nodes
containing the data we want to see.  Much like the "Recovered Nodes" tree.

This will certainly do as a prototype. Later, we could consider a separate
Qt version of gitk, embedded in Leo, with diffs represented as outlines.

*First steps*

gitk can show many things, but we can start (as a thought experiment) with
what it shows by default, namely a list of commits with associated data.
We could show, say, the first 10 commits in the Diff outline, as well as
uncommitted data, showing more only as needed.

Another common way of invoking gitk is with a filename.  This shows only
commits related to that file.

Yesterday's work shows how to get blobs (files) directly from git.
Similarly, it should be straightforward to get a range of commits from git,
with associated data.

That's the plan.  I'm not sure what the priority of doing this will be.
There are so many interesting things on my plate, including many bug and
enhancement items...

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to