On 18/3/22 15:42, Akihiko Odaki wrote:
I don't think this is needed. I could see a diff annotated with a method name even without this change:
% git diff
diff --git a/ui/cocoa.m b/ui/cocoa.m
index cb6e7c41dc6..14a4416cc8b 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1264,6 +1264,7 @@ - (id) init
          [pauseLabel setTextColor: [NSColor blackColor]];
          [pauseLabel sizeToFit];
      }
+    //
      return self;
  }

Commit 29cf16db23 says:
Since commits 0979ed017f0 ("meson: rename .inc.h files to .h.inc")
and 139c1837db7 ("meson: rename included C source files to .c.inc")
'git-diff --function-context' stopped displaying C function context
correctly.

So I suspect Git has some knowledge of common file extensions like .c, .h and .m although I couldn't find in the source code of Git.

'git-diff --function-context' doesn't work for me without this change.

Reply via email to