[PATCH 2/2] git-gui: don't warn for detached head when rebasing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx>
---
 lib/commit.tcl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/commit.tcl b/lib/commit.tcl
index e27e148..d679db4 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 [file join 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\
-- 
1.7.7.908.g383b5

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]