Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/henrahmagix/diff-so-fancy-interactive-bug-example

Example of diff-so-fancy bug when used for --patch
https://github.com/henrahmagix/diff-so-fancy-interactive-bug-example

Last synced: 19 days ago
JSON representation

Example of diff-so-fancy bug when used for --patch

Awesome Lists containing this project

README

        

# diff-so-fancy interactive bug example

A bug exists where diff-so-fancy shows the first line of the next hunk when used with `git add --patch` (using config `interactive.difffilter=diff-so-fancy`) and splitting a hunk with `s`.

This is confusing because it feels like accepting the hunk is accepting the first change of the next hunk, which it isn't actually doing.

## Steps

- `./run.sh` to go into git-add-interactive mode
- Enter `s` to split the hunk

See that the first change of the next hunk – the removal of `let's have a break` – is showing in the current change.

- Enter `y` to accept the first hunk

See that the removal of `let's have a break` is in this hunk too.

- Enter `n` to deny the second hunk
- Diff the staged and unstaged changes

See how the `let's have a break` line is not staged, even though it appeared to be part of the first hunk that was staged.

![image](https://user-images.githubusercontent.com/1429026/33265723-a7bcbdfc-d36a-11e7-81d4-9f31d2475382.png)