Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/henrahmagix/diff-so-fancy-interactive-bug-example
- Owner: henrahmagix
- Created: 2017-11-06T15:55:40.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-27T12:05:28.000Z (about 7 years ago)
- Last Synced: 2024-12-11T20:06:45.291Z (about 2 months ago)
- Language: Shell
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changed
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 hunkSee 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 changesSee 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)