Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-23 Thread Johannes Sixt
Am 23.08.19 um 19:03 schrieb Pratyush Yadav: > So how about we keep a copy of the diff in another variable. This allows > us to enable undoing of reverts. The obvious limitations are that > firstly, unless we use a stack/deque that means only one undo is > allowed. I'm not sure if using an undo

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-23 Thread Pratyush Yadav
+Cc Bert. This has the suggestion I was talking about in one of my previous replies. On 23/08/19 09:28AM, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Maybe the direction taken by this discussion merely suggests that the > > design is a bit unfortunate. Why "revert"? Why not "stash

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-23 Thread Junio C Hamano
Johannes Schindelin writes: > Maybe the direction taken by this discussion merely suggests that the > design is a bit unfortunate. Why "revert"? Why not "stash" instead? Then > you don't need to have that annoying confirmation dialog. Interesting, but it would need a bit more tweak than a simple

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-23 Thread Johannes Schindelin
Hi, On Thu, 22 Aug 2019, Pratyush Yadav wrote: > On 20/08/19 11:19PM, Johannes Sixt wrote: > > Am 20.08.19 um 21:29 schrieb Pratyush Yadav: > > > On 20/08/19 09:21PM, Johannes Sixt wrote: > > >> Please don't do this. This confirmation dialog is unacceptable in my > > >> workflow. I use reversals

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-21 Thread Pratyush Yadav
On 20/08/19 11:19PM, Johannes Sixt wrote: > Am 20.08.19 um 21:29 schrieb Pratyush Yadav: > > On 20/08/19 09:21PM, Johannes Sixt wrote: > >> 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

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-20 Thread Johannes Sixt
Am 20.08.19 um 21:29 schrieb Pratyush Yadav: > On 20/08/19 09:21PM, Johannes Sixt wrote: >> 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

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-20 Thread Pratyush Yadav
On 20/08/19 09:21PM, Johannes Sixt wrote: > 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 > > > + if {$revert} { > > + set query "[mc "Rever

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-20 Thread Johannes Sixt
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 > + if {$revert} { > + set query "[mc "Revert changes in file %s?" \ > + [shor

[PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-19 Thread 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 --- git-gui/git-gui.sh | 25 - git-gui/lib/diff.tcl | 31 ++- 2 files changed, 50 insertions(+), 6 deletions(-)