diff options
Diffstat (limited to 'git-gui/lib/commit.tcl')
-rw-r--r-- | git-gui/lib/commit.tcl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl index 372bed9948..0d81432af5 100644 --- a/git-gui/lib/commit.tcl +++ b/git-gui/lib/commit.tcl @@ -263,7 +263,9 @@ proc commit_commitmsg {curHEAD msg_p} { global is_detached repo_config global pch_error - if {$is_detached && $repo_config(gui.warndetachedcommit)} { + if {$is_detached + && ![file exists [gitdir rebase-merge head-name]] + && [is_config_true gui.warndetachedcommit]} { set msg [mc "You are about to commit on a detached head.\ This is a potentially dangerous thing to do because if you switch\ to another branch you will loose your changes and it can be difficult\ |