diff options
| author | Shawn O. Pearce <spearce@spearce.org> | 2007-01-25 17:07:03 -0500 |
|---|---|---|
| committer | Shawn O. Pearce <spearce@spearce.org> | 2007-01-25 17:16:57 -0500 |
| commit | d070c4cb17e807c157aaeb24d9b80a1112334e57 (patch) | |
| tree | 572736cf18caf9c5a3aaf508bf19e7ed64dbab99 | |
| parent | 3f7fd924a92c07c0fd4e8bd80b941171097db7f0 (diff) | |
| download | git-d070c4cb17e807c157aaeb24d9b80a1112334e57.tar.xz | |
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>
| -rwxr-xr-x | git-gui.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh index 7792eb4d7f..faae6ce7c5 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 { |
