git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] git-gui: make config gui.warndetachedcommit a boolean

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Nov 3, 2011, 11:27 UTC
Message-ID
<CAKPyHN24RwNjJanaMQ0AjXc2iorFw=taCmcS-iuNt0vQ46_TOg@mail.gmail.com>
In-Reply-To
<0f4995b5df707782c73ec83171fb2f512ae887ef.1319312280.git.bert.wesarg@googlemail.com>
On Sat, Oct 22, 2011 at 21:39, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
Show 31 quoted lines
> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
> ---
>  lib/commit.tcl |    2 +-
>  lib/option.tcl |    1 +
>  2 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/lib/commit.tcl b/lib/commit.tcl
> index 372bed9..e27e148 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 719103a..f7f866b 100644
> --- a/lib/option.tcl
> +++ b/lib/option.tcl
> @@ -156,6 +156,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 commiting to a detached head"}}
>                {s gui.stageuntracked {mc "Staging of untracked files"} {list "yes" "no" "ask"}}
>                } {
>                set type [lindex $option 0]
Pat,

if you're interessted in this patch, please fix the typo in the second hunk, mentioning 'commiting'.

Also shouldn't this variable be called gui.warndetachedhead?
Thanks.
Bert
> --
> 1.7.7.908.g383b5
>
>
Previous: Bert WesargNext: Pat Thoyts
Message 3 of 4 in “git-gui: make config gui.warndetachedcommit a boolean”
  1. 1/2 git-gui: make config gui.warndetachedcommit a booleanBert Wesarg, Oct 22, 2011
  2. 2/2 git-gui: don't warn for detached head when rebasingBert Wesarg, Oct 22, 2011
  3. Bert WesargNov 3, 2011
  4. Pat ThoytsNov 5, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.