[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gitattributes: Cover Objective-C source files

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] gitattributes: Cover Objective-C source files
Date: Fri, 18 Mar 2022 17:14:52 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

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

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

[Prev in Thread] Current Thread [Next in Thread]