Skip to content

Reordering diff lines #5503

@matiasmorant

Description

@matiasmorant

Let's say I have this diff:

- a
- b
- c
+ A
+ B
+ C

I only like the change in B, so I only stage changes on B/b, however, that gives:

a
- b
c
+ B

resulting in

a
c
B

not the desired

a
B
c

You could use the patch edit feature, but that is very cumbersome for this common case of just wanting to reorder diff lines.

I'd like to have this diff instead:

-a
+A
-b
+B
-c
+C

A feature to reorder diff line positions would be great.
This seems to be a common problem, is there a simple way of solving it? Couldn't find any

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions