]> asedeno.scripts.mit.edu Git - git.git/commitdiff
git-gui: Sort the list of paths being updated in the index.
authorShawn O. Pearce <spearce@spearce.org>
Mon, 13 Nov 2006 00:29:04 +0000 (19:29 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 13 Nov 2006 05:10:40 +0000 (00:10 -0500)
Its a little surprising to see the UI update the icons for files
in random order, due to the fact that the files are updating in
the order they appear within the array (which is based on a hash
function and not order).  So sort the list of files before we send
any to update-index so the order of operation is means something to
the user.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui

diff --git a/git-gui b/git-gui
index 3f74fbb0764edf0260e292ec26cc8d6fb482edd0..b1a90e66616f0b0c5ff6cb97c77141e04d4e01f4 100755 (executable)
--- a/git-gui
+++ b/git-gui
@@ -1159,6 +1159,7 @@ proc update_index {pathList} {
 
        set update_index_cp 0
        set update_index_rsd 0
+       set pathList [lsort $pathList]
        set totalCnt [llength $pathList]
        set batch [expr {int($totalCnt * .01) + 1}]
        if {$batch > 25} {set batch 25}