jesseduffield / jesseduffield/lazygit

Reordering diff lines

Open
#5,503 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.