[PATCH 9/9] gitk: default select reset hard in dialog
- From
- Jens Lidestrom via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Jun 27, 2023, 14:41 UTC
- Message-ID
- <97857c3509fb4b45e1bc2d29588374a2631a7c2d.1687876885.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.1551.git.1687876884.gitgitgadget@gmail.com>
From: Jens Lidestrom <jens@lidestrom.se>
Reset hard is dangerous but also the most common reset type, and not having it pre-selected in the dialog is annoying to users.
It is also less dangerous in the GUI where there is a confirmation dialog. Also, dangling commits remain in the GUI and can be recovered.
Signed-off-by: Jens Lidestrom <jens@lidestrom.se> --- gitk-git/gitk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk index 9d93053e360..5b0a0ea46be 100755 --- a/gitk-git/gitk +++ b/gitk-git/gitk @@ -9906,7 +9906,9 @@ proc resethead {reset_target_id} { [mc "Reset branch %s to %s?" $mainhead [commit_name $reset_target_id 1]] pack $w.m -side top -fill x -padx 20 -pady 20 ${NS}::labelframe $w.f -text [mc "Reset type:"] - set resettype mixed + # Reset hard is dangerous but also the most common reset type, and not + # having it pre-selected in the dialog is annoying to users. + set resettype hard ${NS}::radiobutton $w.f.soft -value soft -variable resettype \ -text [mc "Soft: Leave working tree and index untouched"] grid $w.f.soft -sticky w
-- gitgitgadget