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>
This commit is contained in:
Bert Wesarg 2011-10-22 21:39:39 +02:00 committed by Pat Thoyts
parent 54531e7c7a
commit f49517a862
2 changed files with 2 additions and 1 deletions

View File

@ -263,7 +263,7 @@ proc commit_commitmsg {curHEAD msg_p} {
global is_detached repo_config global is_detached repo_config
global pch_error 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.\ set msg [mc "You are about to commit on a detached head.\
This is a potentially dangerous thing to do because if you switch\ 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\ to another branch you will loose your changes and it can be difficult\

View File

@ -157,6 +157,7 @@ proc do_options {} {
{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}} {i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
{t gui.newbranchtemplate {mc "New Branch Name Template"}} {t gui.newbranchtemplate {mc "New Branch Name Template"}}
{c gui.encoding {mc "Default File Contents Encoding"}} {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"}} {s gui.stageuntracked {mc "Staging of untracked files"} {list "yes" "no" "ask"}}
} { } {
set type [lindex $option 0] set type [lindex $option 0]