Adding annotated functions to an existing source file produces mis-aligned diffs. For example, consider adding the provideNewThing method:
@Provides
Foo provideFoo() {...}
@Provides
NewThing provideNewThing() {...}
@Provides
Bar provideBar() {...}
Running git diff on the command line will show:
@Provides
Foo provideFoo() {...}
@Provides
+ NewThing provideNewThing() {...}
+
+ @Provides
Bar provideBar() {...}
This is not ideal. It appears I've introduced the @Provides annotation to provideBar. A closer look shows otherwise, but it's easy to miss.
Ideally there is a git diff <some-options> which outputs:
@Provides
Foo provideFoo() {...}
+
+ @Provides
+ NewThing provideNewThing() {...}
@Provides
Bar provideBar() {...}
Is this possible?

git diff --diff-algorithm=patience?