Skip to contentSkip to conversation

git-gui: Do not select Revert Changes by default

PATCH In review Matthew L Daniel 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-gui: Do not select Revert Changes by default

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(-)
git-gui/lib/index.tcl +1 -1
index 8efbbdd..252aa33 100644
@@ -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"] \
 		]
Signature · 1 line
1.7.9.msysgit.0
#1 lore raw

Am 17.03.2012 16:12, schrieb Matthew L Daniel:

Quoted 13 lines

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(-)
git-gui/lib/index.tcl +0 -0
index 8efbbdd..252aa33 100644

git-gui/lib/index.tcl proc revert_helper {txt paths} { · line 443

Quoted 8 lines
git-gui/lib/index.tcl +1 -1
@@ -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

#2 lore raw

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

Quoted 32 lines · Johannes Sixt

Am 17.03.2012 16:12, schrieb Matthew L Daniel:

Quoted 20 lines

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(-)
git-gui/lib/index.tcl +1 -1
index 8efbbdd..252aa33 100644
@@ -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"] \
Quoted 1 line

              ]

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