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>
This commit is contained in:
@ -400,7 +400,7 @@ proc rescan {after {honor_trustmtime 1}} {
|
|||||||
global HEAD PARENT MERGE_HEAD commit_type
|
global HEAD PARENT MERGE_HEAD commit_type
|
||||||
global ui_index ui_workdir ui_status_value ui_comm
|
global ui_index ui_workdir ui_status_value ui_comm
|
||||||
global rescan_active file_states
|
global rescan_active file_states
|
||||||
global repo_config
|
global repo_config single_commit
|
||||||
|
|
||||||
if {$rescan_active > 0 || ![lock_index read]} return
|
if {$rescan_active > 0 || ![lock_index read]} return
|
||||||
|
|
||||||
@ -427,6 +427,11 @@ proc rescan {after {honor_trustmtime 1}} {
|
|||||||
$ui_comm edit modified false
|
$ui_comm edit modified false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if {!$single_commit} {
|
||||||
|
load_all_heads
|
||||||
|
populate_branch_menu
|
||||||
|
}
|
||||||
|
|
||||||
if {$honor_trustmtime && $repo_config(gui.trustmtime) eq {true}} {
|
if {$honor_trustmtime && $repo_config(gui.trustmtime) eq {true}} {
|
||||||
rescan_stage2 {} $after
|
rescan_stage2 {} $after
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user