git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[GSoC PATCH 2/2] t4018: add tests for gitconfig in userdiff

From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Date
Mar 19, 2025, 17:20 UTC
Message-ID
<20250319172016.2115-3-lucasseikioshiro@gmail.com>
In-Reply-To
<20250319172016.2115-1-lucasseikioshiro@gmail.com>

Add userdiff tests for gitconfig files. These files define sections and subsections, with and without indentation.

Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
---
 t/t4018/gitconfig-section             | 5 +++++
 t/t4018/gitconfig-section-noindent    | 5 +++++
 t/t4018/gitconfig-subsection          | 7 +++++++
 t/t4018/gitconfig-subsection-noindent | 7 +++++++
 4 files changed, 24 insertions(+)
 create mode 100644 t/t4018/gitconfig-section
 create mode 100644 t/t4018/gitconfig-section-noindent
 create mode 100644 t/t4018/gitconfig-subsection
 create mode 100644 t/t4018/gitconfig-subsection-noindent
diff --git a/t/t4018/gitconfig-section b/t/t4018/gitconfig-section
new file mode 100644
index 0000000000..866aa70b24
--- /dev/null
+++ b/t/t4018/gitconfig-section
@@ -0,0 +1,5 @@
+[RIGHT]
+        # comment
+        ; comment
+        name = value
+        ChangeMe
\ No newline at end of file
diff --git a/t/t4018/gitconfig-section-noindent b/t/t4018/gitconfig-section-noindent
new file mode 100644
index 0000000000..75a401b24b
--- /dev/null
+++ b/t/t4018/gitconfig-section-noindent
@@ -0,0 +1,5 @@
+[RIGHT]
+# comment
+; comment
+name = value
+ChangeMe
\ No newline at end of file
diff --git a/t/t4018/gitconfig-subsection b/t/t4018/gitconfig-subsection
new file mode 100644
index 0000000000..06243db626
--- /dev/null
+++ b/t/t4018/gitconfig-subsection
@@ -0,0 +1,7 @@
+[LEFT]
+
+[LEFT "RIGHT"]
+      # comment
+      ; comment
+      name = value
+      ChangeMe
\ No newline at end of file
diff --git a/t/t4018/gitconfig-subsection-noindent b/t/t4018/gitconfig-subsection-noindent
new file mode 100644
index 0000000000..a100b81cf1
--- /dev/null
+++ b/t/t4018/gitconfig-subsection-noindent
@@ -0,0 +1,7 @@
+[LEFT]
+
+[LEFT "RIGHT"]
+# comment
+; comment
+name = value
+ChangeMe
\ No newline at end of file
-- 
2.39.5 (Apple Git-154)
Previous: D. Ben KnobleNext: Patrick Steinhardt
Message 5 of 7 in “add userdiff driver for gitconfig”
  1. 0/2 add userdiff driver for gitconfigLucas Seiki Oshiro, Mar 19, 2025
  2. 1/2 userdiff: add builtin driver for gitconfig syntaxLucas Seiki Oshiro, Mar 19, 2025
  3. Patrick SteinhardtMar 20, 2025
  4. D. Ben KnobleMar 21, 2025
  5. 2/2 t4018: add tests for gitconfig in userdiffLucas Seiki Oshiro, Mar 19, 2025
  6. Patrick SteinhardtMar 20, 2025
  7. Lucas Seiki OshiroMar 23, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.