Git Diff is not showing function names that was affected by a change with hunk header for C# file #3722
Replies: 2 comments 1 reply
-
The c# settings are in the git\userdiff.c file. I don't believe they have changed recently (RelNotes: in 2.17 recognizes "async" keyword; in 2.33.0 learned the token "record"). Your two comparison use different command lines and file order, which may have an impact. The |
Beta Was this translation helpful? Give feedback.
-
Please note the The first diff does not show that option, therefore it is fine. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am using .gitattributes (*.cs diff=csharp) for getting name of functions in git diff, it works fine with git version 2.27.0.windows.1.
When upgraded to git version 2.30.2.windows.1, git diff not giving function name in hunk header. Is there a way to get around this issue?
git diff --unified=0 $commitID^! $filePath or git diff --function-context $commitID^! $filePath
---------------------------- git version 2.27.0.windows.1-----------------------------------
diff --git a/src/BusinessLogic/Extensions/GeneralExtensions.cs b/src/BusinessLogic/Extensions/GeneralExtensions.cs
index c126e01f..637ee3b4 100644
--- a/src/BusinessLogic/Extensions/GeneralExtensions.cs
+++ b/src/BusinessLogic/Extensions/GeneralExtensions.cs
@@ -44,3 +44,3 @@ public static string ToTitleCaseChange(this string title)
------------------------------------------git version 2.30.2.windows.1--------------------------------------
diff --cc src/BusinessLogic/Extensions/GeneralExtensions.cs
index 637ee3b4,637ee3b4..c126e01f
--- a/src/BusinessLogic/Extensions/GeneralExtensions.cs
+++ b/src/BusinessLogic/Extensions/GeneralExtensions.cs
@@@ -44,3 -44,3 +44,3 @@@ namespace Bpp.Applications.Business.C
Beta Was this translation helpful? Give feedback.
All reactions