visualgitio / LGit

Git porcelain & MSSCCI provider
Other
11 stars 2 forks source link

Tolerable diff UI #2

Open NattyNarwhal opened 3 years ago

NattyNarwhal commented 3 years ago

The diff view is pretty OK, but could be much better:


Old post:

Right now, it's a ListBox that can barely handle newlines.

Prior art from i.e. SourceSafe would suggest a split view, but the lg2 diff format and git's own view of them makes this a little awkward, because it deals with actual diffs, not comparing two file instances. The SccDiff API also deals in single files, but we can support DirDiff later, and that can be the exact same window, just we gather a bigger diff.

What would be a more interesting way of going about it is say, using a ListView and an image list; with the git_diff_foreach (not print since we're not making a blob/printing to text), we can insert an item and tag it with file/hunk/binary/context/add/remove. We can also add commands for i.e saving/copying the diff as a text blob, dealing with hunks, etc.

NattyNarwhal commented 3 years ago

It's gotten better from the LB, but could be better. Updating OP.

NattyNarwhal commented 3 years ago

I realize diff could be done from a branch interface too...

NattyNarwhal commented 3 years ago

Diff from branch UI is done. Compares against HEAD.