]> source.dussan.org Git - jgit.git/commit
Support built-in diff drivers for hunk header function names 34/1203734/10
authorKaushik Lingarkar <quic_kaushikl@quicinc.com>
Tue, 19 Nov 2024 17:37:33 +0000 (09:37 -0800)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 20 Nov 2024 09:53:18 +0000 (10:53 +0100)
commit4b3c5194acd8a9b18bf269888cab2ea29c376508
treea4f79634cf2980e155125be09f45c50af85a3137
parentd34f8b523638fc95b2e7006d02c9f6a756cbba85
Support built-in diff drivers for hunk header function names

The regexes defined for each built-in driver will be used to determine
the function name for a hunk header. Each driver can specify a list of
regexes to negate and match. They can also define pattern compilation
flags if needed. These drivers only apply to text files with unified
patch type.

Following built-in drivers have been added:
- cpp
- dts
- java
- python
- rust

Support for more languages can be added as needed to match the cgit
implementation.

Change-Id: Ice5430bfed7e4aaf9f00e52e44402479984953c5
org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/greeting.c [new file with mode: 0644]
org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/greeting.javasource [new file with mode: 0644]
org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/greeting.py [new file with mode: 0644]
org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/greeting.rs [new file with mode: 0644]
org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/sample.dtsi [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterBuiltInDriverTest.java [new file with mode: 0644]
org.eclipse.jgit/.settings/.api_filters
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffDriver.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java