git-gui: Update known branches during rescan.
If the user has created (or deleted) a branch through an external tool, and uses Rescan, they probably are trying to make git-gui update to show their newly created branch. So now we load all known heads and update the branch menu during any rescan operation, just in-case the set of known branches was modified. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Feb 8, 2007 at 15:59 UTC
63faf4df6e174cc1e33a759d49133044c732ea32
1 file changed
+6
-1
git-gui.sh
+6
-1
@@ -400,7 +400,7 @@ proc rescan {after {honor_trustmtime 1}} {
400
global HEAD PARENT MERGE_HEAD commit_type
401
global ui_index ui_workdir ui_status_value ui_comm
402
global rescan_active file_states
403
- global repo_config
403
+ global repo_config single_commit
404
405
if {$rescan_active > 0 || ![lock_index read]} return
406
@@ -427,6 +427,11 @@ proc rescan {after {honor_trustmtime 1}} {
427
$ui_comm edit modified false
428
}
429
430
+ if {!$single_commit} {
431
+ load_all_heads
432
+ populate_branch_menu
433
+ }
434
+
435
if {$honor_trustmtime && $repo_config(gui.trustmtime) eq {true}} {
436
rescan_stage2 {} $after
437
} else {