summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8f52548)
raw | patch | inline | side by side (parent: 8f52548)
author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 14 Nov 2006 06:42:32 +0000 (01:42 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 14 Nov 2006 06:42:32 +0000 (01:42 -0500) |
Like rescan we also have cases where we need to perform a script
after we have finished updating a number of files in the index. By
changing the parameter structure of update_index we can easily pass
through any script we need to run afterwards, such as picking up
in the middle of a commit, or finishing what is left of a rescan.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
after we have finished updating a number of files in the index. By
changing the parameter structure of update_index we can easily pass
through any script we need to run afterwards, such as picking up
in the middle of a commit, or finishing what is left of a rescan.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index 2c8501eebfba986aa9b3e482292e94f395abdef8..be42b910677f6003c623af1d60e68132654737e6 100755 (executable)
--- a/git-gui
+++ b/git-gui
}
}
if {$pathList ne {}} {
- update_index $pathList
+ update_index \
+ "Updating included files" \
+ $pathList \
+ [concat {reshow_diff;} $after]
return
}
}
$ui_other conf -state disabled
}
-proc update_index {pathList} {
+proc update_index {msg pathList after} {
global update_index_cp update_index_rsd ui_status_value
if {![lock_index update]} return
if {$batch > 25} {set batch 25}
set ui_status_value [format \
- "Including files ... %i/%i files (%.2f%%)" \
+ "$msg... %i/%i files (%.2f%%)" \
$update_index_cp \
$totalCnt \
0.0]
$pathList \
$totalCnt \
$batch \
+ $msg \
+ $after \
]
}
-proc write_update_index {fd pathList totalCnt batch} {
+proc write_update_index {fd pathList totalCnt batch msg after} {
global update_index_cp update_index_rsd ui_status_value
global file_states ui_fname_value
if {$update_index_cp >= $totalCnt} {
close $fd
unlock_index
- set ui_status_value {Ready.}
- if {$update_index_rsd} {
- reshow_diff
- }
+ if {$update_index_rsd} reshow_diff
+ uplevel #0 $after
return
}
}
set ui_status_value [format \
- "Including files ... %i/%i files (%.2f%%)" \
+ "$msg... %i/%i files (%.2f%%)" \
$update_index_cp \
$totalCnt \
[expr {100.0 * $update_index_cp / $totalCnt}]]
if {$pathList eq {}} {
unlock_index
} else {
- update_index $pathList
+ update_index \
+ "Including all modified files" \
+ $pathList \
+ {set ui_status_value {Ready to commit.}}
}
}
$ui_other tag remove in_sel 0.0 end
if {$col == 0} {
- update_index [list $path]
+ update_index \
+ "Including [short_path $path]" \
+ [list $path] \
+ {set ui_status_value {Ready.}}
} else {
show_diff $path $w $lno
}