Issue
I keep running into the following problem and it really exacerbates my OCD. Look at the following screenshot.
I added that whole testAction
function to the end of a class but instead of highlighting the whole function as having been added (with that green border), it skips one of the curly braces of the if statement and instead highlights the last curly brace of the class definition. Is there a way to tell Netbeans that the function definition and body (and only the function definition and body) should be highlighted instead?
Solution
This is because of a git hunk definition: how git determines what has changed.
See "Unexpected result in git-diff" as an example.
Here, Git determine the }
has not changed compared to the previous code, and detect two hunks (block of changes).
Answered By - VonC