git-gui: Reimplement and enhance auto-selection of diffs.
commit29853b901045ff09ac8e5b48a01ebbc96fa4874d
authorAlexander Gavrilov <angavrilov@gmail.com>
Sat, 30 Aug 2008 21:02:56 +0000 (31 01:02 +0400)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 5 Sep 2008 04:28:55 +0000 (4 21:28 -0700)
tree1415eb26dff3d22037f5a51404ac9e892a200721
parentff515d81faa22f26b611ed7fd06a76d0c300ea39
git-gui: Reimplement and enhance auto-selection of diffs.

Generalize the next_diff system, and implement auto-reselection
for merge tool resolution and reshow_diff. Also add auto-selection
of diffs after rescan, if no diff is already selected.

New auto-select rules:

- Rescan auto-selects the first conflicting file, or if none
  a modified tracked file, if nothing was selected previously.
- Resolving a conflict auto-selects the nearest conflicting
  file, or nothing if everything is resolved.
- Staging the last remaining hunk auto-selects the nearest
  modified staged file.
- Staging a file through its icon auto-selects the nearest file.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh
lib/diff.tcl
lib/mergetool.tcl