From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Pat Thoyts <patthoyts@users.sourceforge.net>
Cc: Heiko Voigt <hvoigt@hvoigt.net>,
git@vger.kernel.org, Bert Wesarg <bert.wesarg@googlemail.com>
Subject: [PATCH 2/2] git-gui: don't warn for detached head when rebasing
Date: Sat, 22 Oct 2011 21:39:40 +0200 [thread overview]
Message-ID: <a9a6eb9e70a8d4a75f2061a51bf401469d1b0b7f.1319312280.git.bert.wesarg@googlemail.com> (raw)
In-Reply-To: <0f4995b5df707782c73ec83171fb2f512ae887ef.1319312280.git.bert.wesarg@googlemail.com>
In-Reply-To: <0f4995b5df707782c73ec83171fb2f512ae887ef.1319312280.git.bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
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
next prev parent reply other threads:[~2011-10-22 19:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-22 19:39 [PATCH 1/2] git-gui: make config gui.warndetachedcommit a boolean Bert Wesarg
2011-10-22 19:39 ` Bert Wesarg [this message]
2011-11-03 11:27 ` Bert Wesarg
2011-11-05 0:48 ` Pat Thoyts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a9a6eb9e70a8d4a75f2061a51bf401469d1b0b7f.1319312280.git.bert.wesarg@googlemail.com \
--to=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
--cc=patthoyts@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).