diff options
author | Bert Wesarg <bert.wesarg@googlemail.com> | 2011-10-22 21:39:39 +0200 |
---|---|---|
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | 2011-11-05 00:39:03 +0000 |
commit | f49517a862529f8f0898c414113a45f40cc54565 (patch) | |
tree | 1fa4fafebbb6b55384703155ebbd376b107f52a2 | |
parent | 54531e7c7aeca965c23e60a6805059826a8de75a (diff) | |
download | git-f49517a862529f8f0898c414113a45f40cc54565.tar.gz |
git-gui: make config gui.warndetachedcommit a boolean
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rw-r--r-- | lib/commit.tcl | 2 | ||||
-rw-r--r-- | lib/option.tcl | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/commit.tcl b/lib/commit.tcl index 372bed9948..e27e148803 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -263,7 +263,7 @@ proc commit_commitmsg {curHEAD msg_p} { global is_detached repo_config global pch_error - if {$is_detached && $repo_config(gui.warndetachedcommit)} { + if {$is_detached && [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\ diff --git a/lib/option.tcl b/lib/option.tcl index fb0677675a..0cf1da1d7e 100644 --- a/lib/option.tcl +++ b/lib/option.tcl @@ -157,6 +157,7 @@ proc do_options {} { {i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}} {t gui.newbranchtemplate {mc "New Branch Name Template"}} {c gui.encoding {mc "Default File Contents Encoding"}} + {b gui.warndetachedcommit {mc "Warn before committing to a detached head"}} {s gui.stageuntracked {mc "Staging of untracked files"} {list "yes" "no" "ask"}} } { set type [lindex $option 0] |