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>
Bert Wesarg committed
Oct 22, 2011 at 21:39 UTC
f49517a862529f8f0898c414113a45f40cc54565
2 files changed
+2
-1
lib/commit.tcl
+1
-1
@@ -263,7 +263,7 @@ proc commit_commitmsg {curHEAD msg_p} {
263
global is_detached repo_config
264
global pch_error
265
266
- if {$is_detached && $repo_config(gui.warndetachedcommit)} {
266
+ if {$is_detached && [is_config_true gui.warndetachedcommit]} {
267
set msg [mc "You are about to commit on a detached head.\
268
This is a potentially dangerous thing to do because if you switch\
269
to another branch you will loose your changes and it can be difficult\
lib/option.tcl
+1
@@ -157,6 +157,7 @@ proc do_options {} {
157
{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
158
{t gui.newbranchtemplate {mc "New Branch Name Template"}}
159
{c gui.encoding {mc "Default File Contents Encoding"}}
160
+ {b gui.warndetachedcommit {mc "Warn before committing to a detached head"}}
161
{s gui.stageuntracked {mc "Staging of untracked files"} {list "yes" "no" "ask"}}
162
} {
163
set type [lindex $option 0]