From: Bert Wesarg Date: Sat, 22 Oct 2011 19:39:40 +0000 (+0200) Subject: git-gui: don't warn for detached head when rebasing X-Git-Tag: gitgui-0.16.0~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8d166bf0950889743695174e55ea9201e9db9cd;p=git.git git-gui: don't warn for detached head when rebasing Signed-off-by: Bert Wesarg Signed-off-by: Pat Thoyts --- diff --git a/lib/commit.tcl b/lib/commit.tcl index e27e14880..0d81432af 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -263,7 +263,9 @@ proc commit_commitmsg {curHEAD msg_p} { global is_detached repo_config global pch_error - if {$is_detached && [is_config_true 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\