diff --git a/git-gui.sh b/git-gui.sh index 7792eb4d7fd..faae6ce7c50 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -2271,6 +2271,13 @@ The rescan will be automatically started now. return } + # -- Don't do a pointless switch. + # + if {$current_branch eq $new_branch} { + unlock_index + return + } + if {$repo_config(gui.trustmtime) eq {true}} { switch_branch_stage2 {} $new_branch } else {