mbox series

[v3,0/4] git-gui: Add ability to revert selected hunks and lines

Message ID 20190828215725.13376-1-me@yadavpratyush.com (mailing list archive)
Headers show
Series git-gui: Add ability to revert selected hunks and lines | expand

Message

Pratyush Yadav Aug. 28, 2019, 9:57 p.m. UTC
Hi,

This series adds the ability to revert selected lines and hunks in
git-gui. Partially based on the patch by Bert Wesarg [0].

The commits can be found in the topic branch 'py/revert-hunks-lines'
at https://github.com/prati0100/git-gui/tree/py/revert-hunks-lines

Changes in v3:
- Drop the confirmation dialog on partial reverts. It is still there for
  full file reverts (which was the original behaviour).
- Allow undoing the last revert.
- Update the context menu button layout. In v2, the layout was:
   Stage Hunk
   Revert Hunk
   Stage Lines
   Revert Lines

  Now it is:
   Stage Hunk
   Stage Lines
   -----------
   Revert Hunk
   Revert Lines
   Undo Last Revert
- Return early when applying a patch fails. This is useful for this
  series because in that case we don't save a faulty patch in
  last_revert, causing the same error to pop up when reverting the patch
  that failed to apply in the first place.

Changes in v2:
- Add an option to disable the revert confirmation prompt as suggested
  by Johannes Sixt.
- Base the patches on Pat's git-gui tree instead of git.git.

[0]
https://public-inbox.org/git/a9ba4550a29d7f3c653561e7029f0920bf8eb008.1326116492.git.bert.wesarg@googlemail.com/

Pratyush Yadav (4):
  git-gui: allow reverting selected lines
  git-gui: allow reverting selected hunk
  git-gui: return early when patch fails to apply
  git-gui: allow undoing last revert

 git-gui.sh   | 57 +++++++++++++++++++++++++++++--
 lib/diff.tcl | 96 ++++++++++++++++++++++++++++++++++++++++++++--------
 2 files changed, 135 insertions(+), 18 deletions(-)

--
2.21.0

Comments

Pratyush Yadav Sept. 10, 2019, 7:21 p.m. UTC | #1
Johannes, Bert, All,

If there are no further objections with the series, I will merge it in.

On 29/08/19 03:27AM, Pratyush Yadav wrote:
> Hi,
> 
> This series adds the ability to revert selected lines and hunks in
> git-gui. Partially based on the patch by Bert Wesarg [0].
> 
> The commits can be found in the topic branch 'py/revert-hunks-lines'
> at https://github.com/prati0100/git-gui/tree/py/revert-hunks-lines
> 
> Changes in v3:
> - Drop the confirmation dialog on partial reverts. It is still there for
>   full file reverts (which was the original behaviour).
> - Allow undoing the last revert.
> - Update the context menu button layout. In v2, the layout was:
>    Stage Hunk
>    Revert Hunk
>    Stage Lines
>    Revert Lines
> 
>   Now it is:
>    Stage Hunk
>    Stage Lines
>    -----------
>    Revert Hunk
>    Revert Lines
>    Undo Last Revert
> - Return early when applying a patch fails. This is useful for this
>   series because in that case we don't save a faulty patch in
>   last_revert, causing the same error to pop up when reverting the patch
>   that failed to apply in the first place.
> 
> Changes in v2:
> - Add an option to disable the revert confirmation prompt as suggested
>   by Johannes Sixt.
> - Base the patches on Pat's git-gui tree instead of git.git.
> 
> [0]
> https://public-inbox.org/git/a9ba4550a29d7f3c653561e7029f0920bf8eb008.1326116492.git.bert.wesarg@googlemail.com/
> 
> Pratyush Yadav (4):
>   git-gui: allow reverting selected lines
>   git-gui: allow reverting selected hunk
>   git-gui: return early when patch fails to apply
>   git-gui: allow undoing last revert
> 
>  git-gui.sh   | 57 +++++++++++++++++++++++++++++--
>  lib/diff.tcl | 96 ++++++++++++++++++++++++++++++++++++++++++++--------
>  2 files changed, 135 insertions(+), 18 deletions(-)
> 
> --
> 2.21.0
>
Johannes Sixt Sept. 10, 2019, 8:26 p.m. UTC | #2
Am 10.09.19 um 21:21 schrieb Pratyush Yadav:
> If there are no further objections with the series, I will merge it in.

No objections. I use it in production.

-- Hannes
Bert Wesarg Sept. 12, 2019, 6:59 p.m. UTC | #3
On Tue, Sep 10, 2019 at 10:26 PM Johannes Sixt <j6t@kdbg.org> wrote:
>
> Am 10.09.19 um 21:21 schrieb Pratyush Yadav:
> > If there are no further objections with the series, I will merge it in.
>
> No objections. I use it in production.

yep, Since 2012 ;-)

>
> -- Hannes