# [PATCH] git-gui: Do not select Revert Changes by default

3 messages from 2012-03-17 to 2012-03-17. Participants: Matthew L Daniel, Johannes Sixt, Matthew Daniel.
Thread: https://gitlist.dev/t/29980

## Matthew L Daniel, 2012-03-17 15:12

Subject: [PATCH] git-gui: Do not select Revert Changes by default
Message-ID: <loom.20120317T161127-418@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120317T161127-418%40post.gmane.org

```
Currently, if one activates the revert changes dialog,
it has the destructive button selected as the default.

This change moves the default action to "do nothing".
---
 git-gui/lib/index.tcl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl
index 8efbbdd..252aa33 100644
--- a/git-gui/lib/index.tcl
+++ b/git-gui/lib/index.tcl
@@ -437,7 +437,7 @@ proc revert_helper {txt paths} {
 
 [mc "Any unstaged changes will be permanently lost by the revert."]" \
 		question \
-		1 \
+		0 \
 		[mc "Do Nothing"] \
 		[mc "Revert Changes"] \
 		]
-- 
1.7.9.msysgit.0

```

## Johannes Sixt, 2012-03-17 20:02

Subject: Re: [PATCH] git-gui: Do not select Revert Changes by default
Message-ID: <4F64EDCD.1000405@kdbg.org>
URL: https://gitlist.dev/e/4F64EDCD.1000405%40kdbg.org
In-Reply-To: <loom.20120317T161127-418@post.gmane.org>

```
Am 17.03.2012 16:12, schrieb Matthew L Daniel:
> Currently, if one activates the revert changes dialog,
> it has the destructive button selected as the default.
> 
> This change moves the default action to "do nothing".
> ---
>  git-gui/lib/index.tcl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl
> index 8efbbdd..252aa33 100644
> --- a/git-gui/lib/index.tcl
> +++ b/git-gui/lib/index.tcl
> @@ -437,7 +437,7 @@ proc revert_helper {txt paths} {
>  
>  [mc "Any unstaged changes will be permanently lost by the revert."]" \
>  		question \
> -		1 \
> +		0 \
>  		[mc "Do Nothing"] \
>  		[mc "Revert Changes"] \
>  		]

Gah! Please no!

The destructive action is that you chose Branch->Revert. The dialog is
the "Are you sure?" question. Your change is the equivalent of an "Are
you sure that you are sure?" question. It does not make a lot of
difference for point-and-click people, but you force another keypress on
people who operate git-gui with the keyboard.

-- Hannes

```

## Matthew Daniel, 2012-03-17 20:07

Subject: Re: [PATCH] git-gui: Do not select Revert Changes by default
Message-ID: <CAHtgEPuLjijzcMiAC3QerATyyCAh912tam-KrYgwihe-RQd4JQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAHtgEPuLjijzcMiAC3QerATyyCAh912tam-KrYgwihe-RQd4JQ%40mail.gmail.com
In-Reply-To: <4F64EDCD.1000405@kdbg.org>

```
Okay, I thought perhaps it was a usability oversight. If it is that
way on purpose, then feel free to not apply the patch.

  -- /v\atthew

On Sat, Mar 17, 2012 at 9:02 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> Am 17.03.2012 16:12, schrieb Matthew L Daniel:
>> Currently, if one activates the revert changes dialog,
>> it has the destructive button selected as the default.
>>
>> This change moves the default action to "do nothing".
>> ---
>>  git-gui/lib/index.tcl |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl
>> index 8efbbdd..252aa33 100644
>> --- a/git-gui/lib/index.tcl
>> +++ b/git-gui/lib/index.tcl
>> @@ -437,7 +437,7 @@ proc revert_helper {txt paths} {
>>
>>  [mc "Any unstaged changes will be permanently lost by the revert."]" \
>>               question \
>> -             1 \
>> +             0 \
>>               [mc "Do Nothing"] \
>>               [mc "Revert Changes"] \
>>               ]
>
> Gah! Please no!
>
> The destructive action is that you chose Branch->Revert. The dialog is
> the "Are you sure?" question. Your change is the equivalent of an "Are
> you sure that you are sure?" question. It does not make a lot of
> difference for point-and-click people, but you force another keypress on
> people who operate git-gui with the keyboard.
>
> -- Hannes

```
