git-gui: Refactor update_status -> rescan.
Since we refer to the act of updating our memory structures with index and working directory differences as a rescan in the UI its probably a good idea to make the related procedures have the same name. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Nov 14, 2006 at 01:19 UTC
99058720df7981aaaaf64e9a0d2c658d90b82340
1 file changed
+11
-11
git-gui
+11
-11
@@ -234,7 +234,7 @@ proc repository_state {hdvar ctvar} {
234
}
235
}
236
237
-proc update_status {{final Ready.}} {
237
+proc rescan {{final Ready.}} {
238
global HEAD PARENT commit_type
239
global ui_index ui_other ui_status_value ui_comm
240
global status_active file_states
@@ -265,7 +265,7 @@ proc update_status {{final Ready.}} {
265
}
266
267
if {$repo_config(gui.trustmtime) eq {true}} {
268
- update_status_stage2 {} $final
268
+ rescan_stage2 {} $final
269
} else {
270
set status_active 1
271
set ui_status_value {Refreshing file status...}
@@ -277,11 +277,11 @@ proc update_status {{final Ready.}} {
277
set fd_rf [open "| $cmd" r]
278
fconfigure $fd_rf -blocking 0 -translation binary
279
fileevent $fd_rf readable \
280
- [list update_status_stage2 $fd_rf $final]
280
+ [list rescan_stage2 $fd_rf $final]
281
}
282
}
283
284
-proc update_status_stage2 {fd final} {
284
+proc rescan_stage2 {fd final} {
285
global gitdir PARENT commit_type
286
global ui_index ui_other ui_status_value ui_comm
287
global status_active
@@ -684,7 +684,7 @@ proc load_last_commit {} {
684
set commit_type amend
685
set HEAD {}
686
set PARENT {}
687
- update_status
687
+ rescan
688
} elseif {$parent_count == 1} {
689
set commit_type amend
690
set PARENT $parent
@@ -692,7 +692,7 @@ proc load_last_commit {} {
692
$ui_comm insert end $msg
693
$ui_comm edit modified false
694
$ui_comm edit reset
695
- update_status
695
+ rescan
696
} else {
697
error_popup {You can't amend a merge commit.}
698
return
@@ -720,7 +720,7 @@ repository since our last scan. A rescan is required
720
before committing.
721
}
722
unlock_index
723
- update_status
723
+ rescan
724
return
725
}
726
@@ -987,7 +987,7 @@ repository since our last scan. A rescan is required
987
before a pull can be started.
988
}
989
unlock_index
990
- update_status
990
+ rescan
991
return
992
}
993
@@ -1026,7 +1026,7 @@ proc post_pull_remote {remote branch success} {
1026
set PARENT $HEAD
1027
set $ui_status_value {Ready.}
1028
} else {
1029
- update_status \
1029
+ rescan \
1030
"Conflicts detected while pulling $branch from $remote."
1031
}
1032
}
@@ -1744,7 +1744,7 @@ proc do_quit {} {
1744
}
1745
1746
proc do_rescan {} {
1747
- update_status
1747
+ rescan
1748
}
1749
1750
proc do_include_all {} {
@@ -2559,4 +2559,4 @@ if {!$single_commit} {
2559
populate_remote_menu .mbar.push To push_to
2560
populate_pull_menu .mbar.pull
2561
}
2562
-after 1 update_status
2562
+after 1 rescan