summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Wesarg <bert.wesarg@googlemail.com>2011-10-22 19:39:40 (GMT)
committerPat Thoyts <patthoyts@users.sourceforge.net>2011-11-05 00:39:04 (GMT)
commitd8d166bf0950889743695174e55ea9201e9db9cd (patch)
tree9c7e4efc05b7224b44da7972901f0de2f5caaedb
parentf49517a862529f8f0898c414113a45f40cc54565 (diff)
downloadgit-d8d166bf0950889743695174e55ea9201e9db9cd.zip
git-d8d166bf0950889743695174e55ea9201e9db9cd.tar.gz
git-d8d166bf0950889743695174e55ea9201e9db9cd.tar.bz2
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>
-rw-r--r--lib/commit.tcl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/commit.tcl b/lib/commit.tcl
index e27e148..0d81432 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\