1
0
mirror of https://github.com/git/git.git synced 2025-04-07 18:28:14 +00:00

git-gui: Don't switch branches if changing to the current branch.

Its pointless to switch to the current branch, so don't do it. We
are already on it and the current index and working directory should
just be left alone.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce 2007-01-25 17:07:03 -05:00
parent 3f7fd924a9
commit d070c4cb17

@ -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 {