git-gui: don't warn for detached head when rebasing

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Bert Wesarg committed Oct 22, 2011 at 21:39 UTC d8d166bf0950889743695174e55ea9201e9db9cd
1 file changed +3 -1
lib/commit.tcl
+3 -1
@@ -263,7 +263,9 @@ proc commit_commitmsg {curHEAD msg_p} {
263 global is_detached repo_config
264 global pch_error
265
266 - if {$is_detached && [is_config_true gui.warndetachedcommit]} {
266 + if {$is_detached
267 + && ![file exists [gitdir rebase-merge head-name]]
268 + && [is_config_true gui.warndetachedcommit]} {
269 set msg [mc "You are about to commit on a detached head.\
270 This is a potentially dangerous thing to do because if you switch\
271 to another branch you will loose your changes and it can be difficult\