Merge branch 'lo/userdiff-gitconfig'

* lo/userdiff-gitconfig:
  userdiff: add builtin driver for INI files
This commit is contained in:
Junio C Hamano 2025-04-15 13:50:15 -07:00
commit 7b7fe0a898
6 changed files with 42 additions and 0 deletions

5
t/t4018/ini-section Normal file
View File

@ -0,0 +1,5 @@
[RIGHT]
# comment
; comment
name = value
ChangeMe

View File

@ -0,0 +1,5 @@
[RIGHT]
# comment
; comment
name = value
ChangeMe

View File

@ -0,0 +1,4 @@
[RIGHT] name = value
# comment
; comment
ChangeMe

12
t/t4018/ini-subsection Normal file
View File

@ -0,0 +1,12 @@
[LEFT]
[LEFT "CENTER"]
# comment
; comment
name = value
[LEFT "RIGHT"]
# comment
; comment
name = value
ChangeMe

View File

@ -0,0 +1,12 @@
[LEFT]
[LEFT "CENTER"]
# comment
; comment
name = value
[LEFT "RIGHT"]
# comment
; comment
name = value
ChangeMe

View File

@ -211,6 +211,10 @@ PATTERNS("html",
"^[ \t]*(<[Hh][1-6]([ \t].*)?>.*)$",
/* -- */
"[^<>= \t]+"),
PATTERNS("ini",
"^[ \t]*\\[[^]]+\\]",
/* -- */
"[^ \t]+"),
PATTERNS("java",
"!^[ \t]*(catch|do|for|if|instanceof|new|return|switch|throw|while)\n"
/* Class, enum, interface, and record declarations */