projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f7fd92
)
git-gui: Don't switch branches if changing to the current branch.
author
Shawn O. Pearce
<spearce@spearce.org>
Thu, 25 Jan 2007 22:07:03 +0000
(17:07 -0500)
committer
Shawn O. Pearce
<spearce@spearce.org>
Thu, 25 Jan 2007 22:16:57 +0000
(17:16 -0500)
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>
git-gui.sh
patch
|
blob
|
history
diff --git
a/git-gui.sh
b/git-gui.sh
index 7792eb4d7fdeb9ed646ecc2be87a00f0aeb9f6ee..faae6ce7c5007b037088849bb096b912c6b6fb46 100755
(executable)
--- 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 {