Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Aug 20, 2019, 19:21 UTC
- Message-ID
- <73e63382-4f79-cfd0-47f4-812f9cd4f88b@kdbg.org>
- In-Reply-To
- <20190819214110.26461-3-me@yadavpratyush.com>
Am 19.08.19 um 23:41 schrieb Pratyush Yadav:
> Just like the user can select lines to stage or unstage, add the > ability to revert selected lines. > > Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
Show 7 quoted lines
> + if {$revert} {
> + set query "[mc "Revert changes in file %s?" \
> + [short_path $current_diff_path]]
> +
> +[mc "The selected lines will be permanently lost by the revert."]"
> +
> + set reply [revert_dialog $query]Please don't do this. This confirmation dialog is unacceptable in my workflow. I use reversals of hunks and lines frequently, almost like a secondary code editor. My safety net is the undo function of the IDE, which works across reloads that are triggered by these external edits. These confirmations get in the way.
Show 10 quoted lines
> + if {$reply ne 1} {
> + unlock_index
> + return
> + }
> + }
> +
> set wholepatch {}
>
> while {$first_l < $last_l} {
> -- Hannes