On Thu, Apr 26 2018, Ulrich Windl wrote:

> Thanks for that. It sounds plausible, but I wonder why it works automagically
> for C, but not for Java (Politcal reasons put aside): Using ".c" for C is 
> about
> as common as using ".java" for Java ;-)

It has a bit to do with it being in C, but not in the way you think. By
default Git doesn't enable the "cpp" driver either for *.c, but it just
so happens to do the right thing more of the time because the default
heuristic is basically to search for a nearby line that doesn't start
with whitespace for context.

This doesn't work for Java because your methods tend to be indented
since they're part of the class you're working on.

Reply via email to