Re: [PATCH v2 0/4] git-gui: Add ability to revert selected hunks and lines
From: Junio C Hamano <hidden>
Date: 2019-08-23 16:04:26
Bert Wesarg [off-list ref] writes:
The thing is, that the partial revert "just don't happen by accident". Here are the minimum user actions needed to get to this dialog: 1. whole-file revert - do a Ctrl+J, more or less anywhere in the GUI 2. hunk revert/revert one unselected line - right click anywhere in the diff pane (thats around 60% of the window area) - move the mouse pointer down 3/4 menu items - click this menu item 3. partially revert selected lines - select some content in the diff pane by starting by pressing and holding a left click - end the selection by releasing the left click - move the mouse pointer down 3/4 menu items - click this menu item Thats always at least 2 user actions more than the whole-file revert. Thus this cannot happen by accident quite easily in comparison to the whole-file revert. And thats the reason why this dialog exists, from my point of view. I can see the need to disable the dialog for the whole-file revert, and IIRC that was also requested a long time ago on this list. But I don't see a reason to have this dialog also for the partial reverts as a safety measure.
Thanks for walking us readers through your thought process.