1. Stefan Saasen
  2. git


Bert Wesarg  committed d8d166b

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>

  • Participants
  • Parent commits f49517a
  • Branches master

Comments (0)

Files changed (1)

File lib/commit.tcl

View file
 	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\