1. Introduction
Git stores its settings in plain-text files: the repository’s .git/config, the user’s ~/.gitconfig, the system file and the .gitmodules file that a repository carries for its submodules. Git reads these files with its own parser. Many other programs read them too, through a library rather than by spawning git config: forges and CI systems read .gitmodules to fetch submodules; IDEs and language servers read remotes and branch settings; dependency tools and package managers resolve url.<base>.insteadOf rewrites; release tools read the user’s name and e-mail; and coding agents read aliases and hooks to understand a repository. Each of these libraries makes the claim that it reads the file as git does.
The git configuration format looks like INI, and some libraries are built on generic INI parsers. It is not INI. The git-config documentation [1] defines case-insensitive section and variable names but case-sensitive subsection names; double-quoted subsections with their own escapes; a legacy [section.subsection] form whose subsection is lower-cased; values in which double quotes are removed and may appear anywhere, # and ; start a comment only outside quotes, and the escapes \n, \t, \b, \" and \\ are recognised while any other escape is an error; backslash-newline as a line continuation; and a variable with no = that means boolean true, which is different from an empty value that means false. Each of these rules is a chance for a library to disagree with git.
Disagreement matters in two ways. A library that misreads a value hands its caller the wrong data: an alias with its quotes left in, a refspec list cut to one entry, a boolean inverted. And a library that splits lines differently from git can see keys that git does not see, which is the shape of configuration-injection bugs. Git itself had one in 2023, when a long value written back to a file could be split so that the remainder was read as a new section (CVE-2023-29007) [2].
This paper measures how seven widely used libraries in four languages read the same files that git reads. We use git as the reference, because the format is defined by git’s documentation and its implementation, and run each file through git config -f FILE --list -z. Our contributions are:
- a case list of 76 git config files in five groups, each with git’s own reading;
- a verdict matrix for seven libraries, with every deviating output listed;
- a real-world sample of 39
.gitconfigfiles from popular dotfiles repositories, pinned by commit and hash; - a reproducible package pinned at one commit, which re-runs the matrix in seconds and gave byte-identical results on two runs and on a clean export.
2. Related work
The format. The git-config documentation [1] is the only specification. It describes the syntax in prose, and git’s config.c is the implementation that the documentation describes. Some details are not documented, such as whether a key may appear before any section header or what a backslash at the very end of a file means; we mark such cases as open.
Library documentation and tests. gix-config, the configuration crate of the gitoxide project, documents one known difference from git: it keeps the case of legacy [section.subsection] headers instead of lower-casing them [3]. dulwich documents its include handling and has an option not to expand includes for untrusted .gitmodules files [4]. libgit2 has a configuration fuzzer and has fixed parsing bugs one at a time, for example multi-line values with several quotes (issue #5459) [5]. Each library’s tests check that library against its authors’ reading of the format. We found no published comparison of git config readers against git itself, and no measurement of how real configuration files fare.
Configuration injection. CVE-2023-29007 [2] was a git bug in which a value longer than 1024 bytes, written back during a section rename, was split so that a [ in the remainder started a new section; a malicious .gitmodules could thereby set core.pager or core.sshCommand. The bug was in git’s writer, but it shows why line handling in a config reader is security-relevant: whoever decides where a value ends decides which keys exist.
Differential testing. The method is differential testing in McKeeman’s sense [6], with the reference implementation as the oracle rather than a vote among the libraries, and follows the harness style of earlier Pubroot work on HTTP header handling [10].
3. Method
Subjects (default options, public APIs). CPython 3.13.5: (1) dulwich 1.2.21 ConfigFile.from_path, (2) GitPython 3.2.1 GitConfigParser(path, read_only=True), (3) pygit2 1.21.0 Config(path), which wraps libgit2 1.9.7. Node.js v24.22.1: (4) parse-git-config 3.0.0 parse.sync, which is built on the ini package 1.3.8; (5) isomorphic-git 1.44.19 GitConfigManager.get, from the package’s exported isomorphic-git/managers subpath. isomorphic-git’s public API reads one key at a time and has no way to list all keys, so we read the entries from the parsedConfig field of the object that GitConfigManager.get returns; this is the same object its getConfig uses. Go 1.27.3: (6) go-git v5.19.3 plumbing/format/config Decoder. Rust 1.85.1: (7) gix-config 0.60.0 File::from_bytes_no_includes. gix-config 0.60.0 is the newest release that builds with Rust 1.85; later releases require Rust 1.88 or 1.95.
Reference. oracle.py writes each case to a file in a fresh directory and runs git config -f FILE --list -z with git 2.47.3, with no system or global configuration and the C locale. With -f, git does not follow include directives, and none of the libraries were asked to. git prints each entry as its full key and, if the entry has a value, a newline and the value; an entry with no = has no value, which we record as null. A non-zero exit is a rejection, and git’s message is kept.
Normalisation. Each library’s result is turned into a list of entries, each a full key and a value or null. Section and variable names are lower-cased by us, because git compares them case-insensitively and a library that keeps their case is not wrong. Subsection names are kept as the library reports them, because git compares them case-sensitively. parse-git-config’s ini layer turns the strings true and false into booleans and splits dotted section names into nested objects; we turn the booleans back into strings and join nested names with dots. The entries are compared as a map from each key to the ordered list of its values. Order between different keys is ignored, because no subject promises to keep it, but the order of values within a multi-valued key is kept, because git uses the last value for single-valued settings and all values, in order, for lists such as remote.<name>.fetch.
Cases. gen_cases.py writes 76 files in five groups (Appendix A). Structure (B01–B12) covers single and multiple sections, a section that appears twice, a multi-valued key, an empty file, a comment-only file, CRLF line endings, a UTF-8 byte-order mark, indentation, a key on the same line as its section header, a repeated key and a missing final newline. Names (K01–K14) cover case, dashes, the legacy dotted form with upper-case letters, names that start with a digit or contain an underscore or a space, an empty section name, a key before any section, and the same subsection in different cases. Subsections (S01–S12) cover spaces, escaped quotes and backslashes, an unknown escape, an empty subsection, ] inside the quotes, an unterminated quote, extra spaces, characters after the closing quote, and a URL. Values (V01–V30) cover whitespace trimming, internal whitespace, quoted leading spaces, # and ; comments inside and outside quotes, every documented escape and an undocumented one, line continuation outside and inside quotes, a bare key, an empty value, an unterminated quote, quotes in the middle of a value, a tab, = and ] in a value, a backslash at the end of the file, adjacent quoted strings, a shell function written as an alias, escaped quotes, and trailing tabs. Practical files (L01–L08) are a typical repository config, a .gitmodules entry, aliases with single quotes and with a leading !, a url.insteadOf rewrite, a user section with an includeIf, a Git LFS filter, and a bare boolean.
Two cases are open. K09 places x = 1 before any section header; git accepts it and lists the key x, but the documentation does not say that a key may appear outside a section. V19 ends the file with a backslash; git drops the backslash, and the documentation does not cover it. We show git’s reading for both but do not score them.
Classes (common.py). A gives the same map as git. T gives the same map once git’s implicit true (a bare variable name) is read as the string true; this is the documented meaning of a bare name, so T is not an error, but a caller that distinguishes “set with no value” from “set to true” cannot do so. W gives a different map. R is a library error on a file git reads. L means the library reads a file that git rejects, so a caller that relies on the library to validate a file gets no warning.
Harness. run_all.sh builds the Go and Rust readers (cargo build --locked), runs the four language runners and git on the case list, classes the results and, if the real-world snapshot is present, analyses it too. Dependencies are pinned: Python packages in py/requirements.txt, Node packages by a committed lockfile installed with npm ci, Go modules by go.sum and Rust crates by Cargo.lock.
Reproduce.
git clone https://github.com/buildngrowsv/pubroot-pilots
cd pubroot-pilots && git checkout 6fe78f0369c9d6d5f587b507d642bd8bf4539a3d
cd git-config
python3 -m venv .venv && .venv/bin/pip install -r py/requirements.txt
cd js && npm ci && cd ..
python3 realworld/fetch_gitconfigs.py --restore
PY=.venv/bin/python ./run_all.sh
Requires Python 3.13, Node 24, Go 1.27, Rust 1.85 and git 2.47. Tree: https://github.com/buildngrowsv/pubroot-[REDACTED_SECRET]-config. The --restore step re-reads the 39 real-world files from GitHub at their pinned commits and checks each SHA-256; without it, run_all.sh runs the synthetic matrix only. We ran the script twice with different Python hash seeds and once from a git archive export of the commit into a clean directory, with a fresh virtual environment, npm ci and --restore. All three produced byte-identical files in results/.
4. Results
At least one library differed from git on 35 of the 76 files. Of the 74 scored files, 33 exposed at least one deviation. Table 1 gives the counts per library. Appendix A has the full matrix and Appendix B every deviating output.
Table 1. Classes on the 74 scored files, and the two open cases.
| Library | A | T | W | R | L | K09 | V19 |
|---|---|---|---|---|---|---|---|
| pygit2 (libgit2) | 72 | 0 | 0 | 0 | 2 | A | A |
| gix-config | 71 | 0 | 2 | 0 | 1 | W | A |
| dulwich | 64 | 2 | 4 | 1 | 3 | R | W |
| go-git | 63 | 0 | 4 | 6 | 1 | R | R |
| isomorphic-git | 59 | 2 | 3 | 0 | 10 | A | W |
| GitPython | 55 | 0 | 10 | 0 | 9 | R | A |
| parse-git-config | 44 | 2 | 18 | 0 | 10 | A | W |
pygit2 and gix-config came closest to git, with 72 and 71 of 74. They also differ from each other least, on 5 files. parse-git-config and go-git differ from each other most, on 30. The practical files L01–L07 were read identically by every library. The differences sit in the details of quoting, escaping, line joining and names, which the next paragraphs take in turn.
Quotes and escapes left in place (V07, V08, V16, V23, V27, V28, S02–S04). git removes double quotes wherever they appear in a value and decodes \n, \t, \b, \" and \\. GitPython and parse-git-config do neither. For x = a\nb\tc\bd (V07) git returns a, newline, b, tab, c, backspace, d; both libraries return the ten characters as written. For x = a"b c"d (V16) git returns ab cd; both return a"b c"d. For the escaped quotes in V28, both return the backslashes. GitPython also keeps quotes and backslashes in subsection names: [a "q\"uote"] (S02) becomes the subsection q\"uote instead of q"uote, and [a "back\\slash"] (S03) keeps two backslashes. parse-git-config does the same for S02 and S04. Where git drops the backslash in an unknown subsection escape ([a "b\c"] is subsection bc, S04), GitPython and parse-git-config keep it and go-git rejects the file. A whole value in quotes, x = "a;b#c" (V26), is read correctly by all seven: ini unquotes values that are wholly quoted. It is quotes inside a value that these two libraries miss, and §5 shows that real aliases often have them.
Multi-valued keys (B04, B11). A key may appear more than once, and for list settings git uses every value. parse-git-config keeps only the last. A remote with two fetch refspecs (B04) comes back with one, and a key repeated in a second [a] section (B11) keeps only its second value. A tool that reads remotes through parse-git-config will not see the first refspec.
Line continuation (V10, V11). A backslash at the end of a line joins the next line to the value, outside and inside quotes, and git keeps the whitespace on both sides: x = first \ followed by second is first second with two spaces. isomorphic-git and parse-git-config do not join lines. Both read the value as first \ and then read second as a new bare key, a.second, with the value true. Inside quotes (V11), isomorphic-git returns first \ and drops the second line, while parse-git-config returns "first \ and creates the key a.second". go-git joins the lines but keeps the newline, returning first , newline, second. dulwich joins them but collapses the whitespace to one space. Only GitPython, pygit2 and gix-config matched git on both. The isomorphic-git and parse-git-config behaviour is the one that matters for safety: text that git reads as part of a value becomes a key, so a crafted continuation line can set a key that git itself never sees.
Bare keys (V12, L08). A variable name with no = means true. pygit2, gix-config and GitPython report it as having no value, like git. dulwich, parse-git-config and isomorphic-git report the string true (class T), which has the same boolean meaning. go-git reports an empty string. Under git’s boolean rules an empty value is false, so [pull] followed by a bare rebase (L08) is true to git and false to any caller that interprets go-git’s value with the same rules.
Header and key on one line (B10). git accepts [a] x = 1 and lists a.x = 1. GitPython and isomorphic-git return no entries at all, without an error. parse-git-config returns a key named [a] x at the top level. go-git rejects the file.
Legacy dotted subsections (K03, K11). In the legacy form [a.B], git lower-cases the subsection and lists a.b.x. dulwich, parse-git-config and gix-config keep the case and list a.B.x; gix-config documents this choice [3]. go-git rejects the dot. A lookup of a.b.x against these libraries finds nothing.
Names, quotes and escapes git rejects (K05–K08, K10, S07, S09, S10, V09, V15). git rejects variable names that start with a digit or contain _ or a space, section names with _, an empty section name, an unterminated subsection or value quote, characters around the closing subsection quote, and unknown value escapes such as \q. Every library accepted at least one of these files. pygit2 accepted two: a name that starts with a digit (K05) and an unterminated value quote (V15). GitPython accepted nine and parse-git-config and isomorphic-git ten each. For the unterminated quote x = "open (V15), GitPython, pygit2 and isomorphic-git return open and parse-git-config returns "open. For the unknown escape a\qb (V09), dulwich, GitPython, parse-git-config and isomorphic-git return the text unchanged. isomorphic-git often accepts a malformed section header by ignoring it: for [a_b] (K07), [] (K08) and three malformed subsections (S07, S09, S10) it returns the key x with no section at all.
Other differences. parse-git-config does not skip a UTF-8 byte-order mark (B08) and reads \ufeff[core] as a key; go-git rejects the file. dulwich rejects [a "b"] with two spaces before the quote (S08), which git accepts. go-git rejects an empty subsection [a ""] (S05), which git accepts as subsection "". parse-git-config reads a closing ] inside a quoted subsection (S06) as the end of the header. parse-git-config also keeps the quotes around a value followed by a comment (V20), and gix-config splits x y = 1 (K10) into a bare key x and a key y where git rejects the line.
Open cases. For a key before any section (K09), pygit2, parse-git-config and isomorphic-git list x like git, gix-config drops it, and dulwich, GitPython and go-git reject the file. For a final backslash (V19), GitPython, pygit2 and gix-config drop it like git, dulwich, parse-git-config and isomorphic-git keep it, and go-git rejects the file.
5. Real-world sample
Sample. We took the 100 most-starred GitHub repositories with “dotfiles” in their name (repository search, read once on 2026-11-24) and the example repositories listed in webpro/awesome-dotfiles at a pinned commit, resolved each repository’s default-branch commit, and looked for a git config file at eleven common paths (.gitconfig, gitconfig, git/gitconfig, home/.gitconfig, .config/git/config and similar). 39 repositories had one. The 39 files hold 1,641 entries as git reads them, and git rejected none. The committed list records repository, commit, path and SHA-256 for each file. The file texts are not committed because personal configuration files carry their owners’ names and e-mail addresses; fetch_gitconfigs.py --restore re-reads them and checks every hash, and the results record classes and the names of differing keys, not values.
Table 2. Real-world sample: 39 git config files, 1,641 entries as git reads them. Classes per file; “keys” is the number of keys whose value list differs from git’s, summed over files.
| Library | A | T | W | R | L | Keys differing |
|---|---|---|---|---|---|---|
| pygit2 (libgit2) | 39 | 0 | 0 | 0 | 0 | 0 |
| gix-config | 39 | 0 | 0 | 0 | 0 | 0 |
| dulwich | 38 | 0 | 1 | 0 | 0 | 2 |
| go-git | 38 | 0 | 1 | 0 | 0 | 2 |
| isomorphic-git | 38 | 0 | 1 | 0 | 0 | 7 |
| GitPython | 17 | 0 | 22 | 0 | 0 | 80 |
| parse-git-config | 13 | 0 | 26 | 0 | 0 | 167 |
Files (repository@commit:path): mathiasbynens/dotfiles@b7c7894e7bb2:.gitconfig; lewagon/dotfiles@c12c9f5b37fb:gitconfig; thoughtbot/dotfiles@939a27005b2d:gitconfig; holman/dotfiles@9a90082b61fa:git/gitconfig.symlink; skwp/dotfiles@630d39fb1dfb:git/gitconfig; paulirish/dotfiles@9457fe94db82:.gitconfig; jessfraz/dotfiles@cbbbcb3ccd1b:.gitconfig; nicknisi/dotfiles@5f99a4be9d71:config/git/config; driesvints/dotfiles@32049202c70c:.gitconfig; ryanb/dotfiles@481e9234f156:gitconfig; hlissner/dotfiles@1d73dca3f2f4:config/git/config; garybernhardt/dotfiles@eed3bbab874f:.gitconfig; dikiaap/dotfiles@ef6e4bdee7dd:.gitconfig; mislav/dotfiles@6a4f77589266:gitconfig; wesbos/dotfiles@4c4b0036eb47:.gitconfig; webpro/dotfiles@f06d67883c12:config/git/config; paulmillr/dotfiles@530535edfb60:home/.gitconfig; SeniorMars/dotfiles@ea99c6844e1d:.config/git/config; gf3/dotfiles@9fac550c0e6b:.gitconfig; freekmurze/dotfiles@05044c62b57c:home/.gitconfig; yutkat/dotfiles@6f196e4b97de:.config/git/config; XNM1/linux-nixos-hyprland-config-dotfiles@9518598180b4:home/.gitconfig; fatih/dotfiles@0aad0a27550f:gitconfig; necolas/dotfiles@0a77d4ba026e:git/gitconfig; Mic92/dotfiles@0642d247eda9:home/.gitconfig; avivace/dotfiles@0ff0dc866163:git/.gitconfig; Matt-FTW/dotfiles@0bcecd91cd93:.config/git/config; babarot/dotfiles@bfd0b6fee5cf:home/.gitconfig; anishathalye/dotfiles@f7e7ecb63820:gitconfig; Phantas0s/.dotfiles@998e1e9fd7b3:git/gitconfig; maxhu08/dotfiles@f31923cd13c8:git/.gitconfig; int32bit/dotfiles@7a31997c723d:git/gitconfig; geerlingguy/dotfiles@575f77a28a33:.gitconfig; rexim/dotfiles@36955dfe7aaa:.gitconfig; jessarcher/dotfiles@937de502c829:git/gitconfig; Airblader/dotfiles-manjaro@726f72b0cc9f:.gitconfig; mhartington/dotfiles@9f70efddf955:gitconfig; tpope/dotfiles@30b0609c6bdc:.gitconfig; 2KAbhishek/dots2k@e55ef9b79d9c:config/git/config.
What differs. pygit2 and gix-config read all 39 files as git does. GitPython misread 80 keys in 22 files, and parse-git-config 167 keys in 26. Most of these are aliases. Shell aliases are often written as !"…" or contain --format="…" with escaped quotes, and GitPython and parse-git-config return the quotes and backslashes that git removes. parse-git-config additionally cuts a value at a ; inside quotes when the quotes do not wrap the whole value, so an alias such as !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" is cut after clear; and its last-value-wins rule dropped repeated url.<base>.pushInsteadOf entries. Outside aliases, the affected keys are colour settings, pager and diff-tool settings such as delta, credential helpers and url rewrites.
Continued lines appear in one file, where two long shell-function aliases are written across many lines with backslash-newline. go-git kept the newlines in both values and dulwich collapsed their indentation. isomorphic-git did not join the lines and read shell variable assignments on the continuation lines as keys of their own, creating five keys in the [alias] section that git does not list: alias.b, alias.base, alias.m, alias.push and alias.root. This is a small instance of the injection pattern from §2: what git reads as part of one value, another reader takes as new configuration.
6. Implications (hypotheses)
The following are hypotheses drawn from the matrix and the sample, not measured effects.
Hypothesis 1: readers built on generic INI parsers are the main source of real-world misreads. GitPython builds on Python’s configparser and parse-git-config on the ini package. Together they account for 247 of the 258 misread keys in the sample, and both share the missing quote and escape handling. The other five readers, all written for git’s format, misread at most 7 keys each, and libgit2 and gix-config none.
Hypothesis 2: line joining is the rule most likely to turn a misread into a security issue. A reader that does not join continued lines creates keys that git does not see. In the files we read, the created keys were harmless alias fragments, but a crafted .gitmodules or repository config could place core.sshCommand or core.pager on a continuation line, which git would read as part of a value and such a reader as a setting. We did not test any program that acts on such keys.
Hypothesis 3: tools that read booleans through go-git should treat an empty value with care. go-git cannot distinguish a bare key from an empty value, and the two mean opposite things to git.
For library users. If a program must agree with git, the measured choices are pygit2 (libgit2) and gix-config, or spawning git config --list -z, which is what our reference does. GitPython’s and parse-git-config’s values should not be used where quotes or escapes matter, notably for aliases and URLs.
7. Threats to validity
Reference choice. git 2.47.3 is one version. The documented rules have been stable for many years, but undocumented behaviour, such as the two open cases, could change. We did not test other git versions.
Normalisation. We lower-case section and variable names and ignore order across keys. A library that preserves case or order is not penalised for it, but a library whose lookups depend on case could behave differently from what our map shows. GitPython reports a legacy [a.B] header as the section name a.B; our lower-casing turns it into a.b, which matches git, although GitPython never parsed the subsection. For isomorphic-git we read an undocumented field; its public getConfig reads the same parsed entries, but not through a call that lists them.
Default options and includes. All libraries were used with their default entry points and without include processing. Several offer other modes (dulwich’s include expansion, GitPython’s merged multi-file reading, libgit2’s multi-level configuration), which we did not test. Writers were not tested at all, and writer bugs such as CVE-2023-29007 are outside this study.
Case selection. The 76 cases were written to cover the documented rules and common file shapes, not sampled from use. Deviation counts compare libraries on this list; they are not error rates.
Toolchain constraint. gix-config was measured at 0.60.0 because later releases need a newer Rust than the pinned 1.85. Later releases may differ.
Sample. The real-world files come from popular, public dotfiles repositories, which skew towards experienced users with long alias sections. Repository .git/config files written by git itself are simpler, and our practical cases L01 and L02 suggest every library reads those correctly. The sample shows that misreads occur in real files, not how often they occur across all configurations.
8. Conclusion
Git’s configuration format is small, but its rules for quotes, escapes, continuation lines, bare booleans and subsections are easy to get wrong. Seven libraries read 76 files; at least one differed from git on 35 of them, and every library accepted at least one file that git rejects. libgit2 (through pygit2) and gix-config were closest to git and read all 39 real dotfiles configurations exactly as git does. GitPython and parse-git-config, which build on generic INI parsers, left quotes and escapes in place and misread 247 keys in real files, mostly aliases. isomorphic-git and parse-git-config do not join continued lines and create keys that git does not see, and go-git turns a bare boolean into an empty string that git would read as false. The matrix, the case list and the harness are pinned at one commit, so a library author can check a change against git in seconds.
Appendix A. Full case list and verdict matrix
Files are written as Python string literals (\n newline, \t tab, \r carriage return, \ufeff byte-order mark). “git” is git’s reading as key=value pairs (a bare key is shown as key with no value), or ERR if git rejects the file. Columns: dul = dulwich; gp = GitPython; pg2 = pygit2 (libgit2); pgc = parse-git-config; iso = isomorphic-git; gog = go-git; gix = gix-config. Classes as in §3; “open” marks the two unscored cases.
| ID | File | git | dul | gp | pg2 | pgc | iso | gog | gix |
|---|---|---|---|---|---|---|---|---|---|
| B01 | '[core]\n\tbare = false\n' | ['core.bare=false'] | A | A | A | A | A | A | A |
| B02 | '[core]\n\tbare = false\n[user]\n\tname = A B\n' | ['core.bare=false', 'user.name=A B'] | A | A | A | A | A | A | A |
| B03 | '[a]\n\tx = 1\n[b]\n\ty = 2\n[a]\n\tz = 3\n' | ['a.x=1', 'b.y=2', 'a.z=3'] | A | A | A | A | A | A | A |
| B04 | '[remote "origin"]\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n\tfetch = +refs/tags/*:refs/tags/*\n' | ['remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*', 'remote.origin.fetch=+refs/tags/*:refs/tags/*'] | A | A | A | W | A | A | A |
| B05 | '' | (none) | A | A | A | A | A | A | A |
| B06 | '# only a comment\n; another\n' | (none) | A | A | A | A | A | A | A |
| B07 | '[core]\r\n\tbare = false\r\n\tname = x\r\n' | ['core.bare=false', 'core.name=x'] | A | A | A | A | A | A | A |
| B08 | '\ufeff[core]\n\tbare = true\n' | ['core.bare=true'] | A | A | A | W | A | R | A |
| B09 | '[a]\nx=1\n y = 2\n' | ['a.x=1', 'a.y=2'] | A | A | A | A | A | A | A |
| B10 | '[a] x = 1\n' | ['a.x=1'] | A | W | A | W | W | R | A |
| B11 | '[a]\n\tx = 1\n[a]\n\tx = 2\n' | ['a.x=1', 'a.x=2'] | A | A | A | W | A | A | A |
| B12 | '[core]\n\tbare = false' | ['core.bare=false'] | A | A | A | A | A | A | A |
| K01 | '[Core]\n\tFileMode = true\n' | ['core.filemode=true'] | A | A | A | A | A | A | A |
| K02 | '[my-sec]\n\tmy-key = 1\n' | ['my-sec.my-key=1'] | A | A | A | A | A | A | A |
| K03 | '[a.B]\n\tx = 1\n' | ['a.b.x=1'] | W | A | A | W | A | R | W |
| K04 | '[a "B"]\n\tx = 1\n' | ['a.B.x=1'] | A | A | A | A | A | A | A |
| K05 | '[a]\n\t1x = 1\n' | ERR | L | L | L | L | L | A | A |
| K06 | '[a]\n\tx_y = 1\n' | ERR | A | L | A | L | L | A | A |
| K07 | '[a_b]\n\tx = 1\n' | ERR | A | L | A | L | L | A | A |
| K08 | '[]\n\tx = 1\n' | ERR | L | A | A | L | L | A | A |
| K09 (open) | 'x = 1\n[a]\n\ty = 2\n' | ['x=1', 'a.y=2'] | R | R | A | A | A | R | W |
| K10 | '[a]\n\tx y = 1\n' | ERR | A | L | A | L | L | A | L |
| K11 | '[a.b.C]\n\tx = 1\n' | ['a.b.c.x=1'] | W | A | A | W | A | R | W |
| K12 | '[A "b"]\n\tX = 1\n[a "b"]\n\tx = 2\n' | ['a.b.x=1', 'a.b.x=2'] | A | A | A | A | A | A | A |
| K13 | '[a "b"]\n\tx = 1\n[a "B"]\n\tx = 2\n' | ['a.b.x=1', 'a.B.x=2'] | A | A | A | A | A | A | A |
| K14 | '[a]\n\tx- = 1\n' | ['a.x-=1'] | A | A | A | A | A | A | A |
| S01 | '[a "with space"]\n\tx = 1\n' | ['a.with space.x=1'] | A | A | A | A | A | A | A |
| S02 | '[a "q\\"uote"]\n\tx = 1\n' | ['a.q"uote.x=1'] | A | W | A | W | A | A | A |
| S03 | '[a "back\\\\slash"]\n\tx = 1\n' | ['a.back\\slash.x=1'] | A | W | A | A | A | A | A |
| S04 | '[a "b\\c"]\n\tx = 1\n' | ['a.bc.x=1'] | A | W | A | W | A | R | A |
| S05 | '[a ""]\n\tx = 1\n' | ['a..x=1'] | A | A | A | A | A | R | A |
| S06 | '[a "x]y"]\n\tx = 1\n' | ['a.x]y.x=1'] | A | A | A | W | A | A | A |
| S07 | '[a "open]\n\tx = 1\n' | ERR | A | L | A | L | L | A | A |
| S08 | '[a "b"]\n\tx = 1\n' | ['a.b.x=1'] | R | A | A | A | A | A | A |
| S09 | '[a "b" ]\n\tx = 1\n' | ERR | A | L | A | L | L | L | A |
| S10 | '[a "b"c]\n\tx = 1\n' | ERR | A | L | A | L | L | A | A |
| S11 | '[a "https://example.com/x.git"]\n\tx = 1\n' | ['a.https://example.com/x.git.x=1'] | A | A | A | A | A | A | A |
| S12 | '[a "b.c"]\n\tx = 1\n' | ['a.b.c.x=1'] | A | A | A | A | A | A | A |
| V01 | '[a]\n\tx = padded \n' | ['a.x=padded'] | A | A | A | A | A | A | A |
| V02 | '[a]\n\tx = one two\n' | ['a.x=one two'] | A | A | A | A | A | A | A |
| V03 | '[a]\n\tx = " lead"\n' | ['a.x= lead'] | A | A | A | A | A | A | A |
| V04 | '[a]\n\tx = val # comment\n' | ['a.x=val'] | A | A | A | A | A | A | A |
| V05 | '[a]\n\tx = val ; comment\n' | ['a.x=val'] | A | A | A | A | A | A | A |
| V06 | '[a]\n\tx = "val # not a comment"\n' | ['a.x=val # not a comment'] | A | A | A | A | A | A | A |
| V07 | '[a]\n\tx = a\\nb\\tc\\bd\n' | ['a.x=a\nb\tc\x08d'] | A | W | A | W | A | A | A |
| V08 | '[a]\n\tx = a\\"b\\\\c\n' | ['a.x=a"b\\c'] | A | W | A | W | A | A | A |
| V09 | '[a]\n\tx = a\\qb\n' | ERR | L | L | A | L | L | A | A |
| V10 | '[a]\n\tx = first \\\n second\n' | ['a.x=first second'] | W | A | A | W | W | W | A |
| V11 | '[a]\n\tx = "first \\\n second"\n' | ['a.x=first second'] | W | A | A | W | W | W | A |
| V12 | '[a]\n\tx\n' | ['a.x'] | T | A | A | T | T | W | A |
| V13 | '[a]\n\tx =\n' | ['a.x='] | A | A | A | A | A | A | A |
| V14 | '[a]\n\tx = ""\n' | ['a.x='] | A | A | A | A | A | A | A |
| V15 | '[a]\n\tx = "open\n' | ERR | A | L | L | L | L | A | A |
| V16 | '[a]\n\tx = a"b c"d\n' | ['a.x=ab cd'] | A | W | A | W | A | A | A |
| V17 | '[a]\n\tx = a\tb\n' | ['a.x=a\tb'] | A | A | A | A | A | A | A |
| V18 | '[a]\n\tx = a=b\n' | ['a.x=a=b'] | A | A | A | A | A | A | A |
| V19 (open) | '[a]\n\tx = end\\' | ['a.x=end'] | W | A | A | W | W | R | A |
| V20 | '[a]\n\tx = "a " # c\n' | ['a.x=a '] | A | A | A | W | A | A | A |
| V21 | '[a]\n\tx = héllo wörld\n' | ['a.x=héllo wörld'] | A | A | A | A | A | A | A |
| V22 | '[a]\n\tx = a]b\n' | ['a.x=a]b'] | A | A | A | A | A | A | A |
| V23 | '[a]\n\tx = "a""b"\n' | ['a.x=ab'] | A | W | A | W | A | A | A |
| V24 | '[a]\n\tx = a#b\n' | ['a.x=a'] | A | A | A | A | A | A | A |
| V25 | '[a]\n\tx = a;b\n' | ['a.x=a'] | A | A | A | A | A | A | A |
| V26 | '[a]\n\tx = "a;b#c"\n' | ['a.x=a;b#c'] | A | A | A | A | A | A | A |
| V27 | '[a]\n\tx = !f() { echo "$1"; }; f\n' | ['a.x=!f() { echo $1'] | A | W | A | W | A | A | A |
| V28 | '[a]\n\tx = a \\"b\\" c\n' | ['a.x=a "b" c'] | A | W | A | W | A | A | A |
| V29 | '[a]\n\tx = trailing\t\t\n' | ['a.x=trailing'] | A | A | A | A | A | A | A |
| V30 | '[a]\n\tx = "\\n"\n' | ['a.x=\n'] | A | A | A | A | A | A | A |
| L01 | '[core]\n\trepositoryformatversion = 0\n\tfilemode = true\n\tbare = false\n\tlogallrefupdates = true\n[remote "origin"]\n\turl = git@github.com:o/r.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n[branch "main"]\n\tremote = origin\n\tmerge = refs/heads/main\n' | ['core.repositoryformatversion=0', 'core.filemode=true', 'core.bare=false', 'core.logallrefupdates=true', 'remote.origin.url=git@github.com:o/r.git', 'remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*', 'branch.main.remote=origin', 'branch.main.merge=refs/heads/main'] | A | A | A | A | A | A | A |
| L02 | '[submodule "vendor/lib"]\n\tpath = vendor/lib\n\turl = https://github.com/o/lib.git\n\tbranch = main\n' | ['submodule.vendor/lib.path=vendor/lib', 'submodule.vendor/lib.url=https://github.com/o/lib.git', 'submodule.vendor/lib.branch=main'] | A | A | A | A | A | A | A |
| L03 | "[alias]\n\tlg = log --graph --pretty=format:'%h -%d %s (%cr) <%an>'\n\tst = status -sb\n" | ["alias.lg=log --graph --pretty=format:'%h -%d %s (%cr) <%an>'", 'alias.st=status -sb'] | A | A | A | A | A | A | A |
| L04 | '[alias]\n\tamend = "!git commit --amend --no-edit"\n\tlast = log -1 HEAD\n' | ['alias.amend=!git commit --amend --no-edit', 'alias.last=log -1 HEAD'] | A | A | A | A | A | A | A |
| L05 | '[url "git@github.com:"]\n\tinsteadOf = https://github.com/\n' | ['url.git@github.com:.insteadof=https://github.com/'] | A | A | A | A | A | A | A |
| L06 | '[user]\n\tname = "Ada Lovelace"\n\temail = ada@example.com\n[includeIf "gitdir:~/work/"]\n\tpath = ~/.gitconfig-work\n' | ['user.name=Ada Lovelace', 'user.email=ada@example.com', 'includeif.gitdir:~/work/.path=~/.gitconfig-work'] | A | A | A | A | A | A | A |
| L07 | '[filter "lfs"]\n\tclean = git-lfs clean -- %f\n\tsmudge = git-lfs smudge -- %f\n\tprocess = git-lfs filter-process\n\trequired = true\n' | ['filter.lfs.clean=git-lfs clean -- %f', 'filter.lfs.smudge=git-lfs smudge -- %f', 'filter.lfs.process=git-lfs filter-process', 'filter.lfs.required=true'] | A | A | A | A | A | A | A |
| L08 | '[diff "word"]\n\ttextconv = docx2txt\n[merge]\n\tconflictstyle = zdiff3\n[pull]\n\trebase\n' | ['diff.word.textconv=docx2txt', 'merge.conflictstyle=zdiff3', 'pull.rebase'] | T | A | A | T | T | W | A |
Appendix B. Deviating outputs
Every non-A cell of Appendix A with the library’s entries (or error).
- B04 pgc (W):
['remote.origin.fetch=+refs/tags/*:refs/tags/*'] - B08 pgc (W):
['[core]=true', 'bare=true'] - B08 gog (R): error: 1:1: illegal character U+FEFF
- B10 gp (W): (none)
- B10 pgc (W):
['[a] x=1'] - B10 iso (W): (none)
- B10 gog (R): error: 1:5: expected EOL, EOF, or comment
- B11 pgc (W):
['a.x=2'] - K03 dul (W):
['a.B.x=1'] - K03 pgc (W):
['a.B.x=1'] - K03 gog (R): error: 1:3: illegal character U+002E ‘.’
- K03 gix (W):
['a.B.x=1'] - K05 dul (L):
['a.1x=1'] - K05 gp (L):
['a.1x=1'] - K05 pg2 (L):
['a.1x=1'] - K05 pgc (L):
['a.1x=1'] - K05 iso (L): (none)
- K06 gp (L):
['a.x_y=1'] - K06 pgc (L):
['a.x_y=1'] - K06 iso (L): (none)
- K07 gp (L):
['a_b.x=1'] - K07 pgc (L):
['a_b.x=1'] - K07 iso (L):
['x=1'] - K08 dul (L):
['.x=1'] - K08 pgc (L):
['.x=1'] - K08 iso (L):
['x=1'] - K09 dul (R): error: ValueError: setting b’x = 1\n’ without section
- K09 gp (R): error: MissingSectionHeaderError: File contains no section headers. file: ‘/K09-20.config’, line: 1 ‘x = 1\n’
- K09 gog (R): error: 1:1: expected section header
- K09 gix (W):
['a.y=2'] - K10 gp (L):
['a.x y=1'] - K10 pgc (L):
['a.x y=1'] - K10 iso (L): (none)
- K10 gix (L):
['a.x', 'a.y=1'] - K11 dul (W):
['a.b.C.x=1'] - K11 pgc (W):
['a.b.C.x=1'] - K11 gog (R): error: 1:3: illegal character U+002E ‘.’
- K11 gix (W):
['a.b.C.x=1'] - S02 gp (W):
['a.q\\"uote.x=1'] - S02 pgc (W):
['a.q\\"uote.x=1'] - S03 gp (W):
['a.back\\\\slash.x=1'] - S04 gp (W):
['a.b\\c.x=1'] - S04 pgc (W):
['a.b\\c.x=1'] - S04 gog (R): error: 1:7: unknown escape sequence
- S05 gog (R): error: 1:4: empty subsection name
- S06 pgc (W):
['[a "x]y"]=true', 'x=1'] - S07 gp (L):
['a "open.x=1'] - S07 pgc (L):
['a "open.x=1'] - S07 iso (L):
['x=1'] - S08 dul (R): error: ValueError: Invalid subsection b’ “b”’
- S09 gp (L):
['a.b.x=1'] - S09 pgc (L):
['a.b.x=1'] - S09 iso (L):
['x=1'] - S09 gog (L):
['a.b.x=1'] - S10 gp (L):
['a "b"c.x=1'] - S10 pgc (L):
['a "b"c.x=1'] - S10 iso (L):
['x=1'] - V07 gp (W):
['a.x=a\\nb\\tc\\bd'] - V07 pgc (W):
['a.x=a\\nb\\tc\\bd'] - V08 gp (W):
['a.x=a\\"b\\\\c'] - V08 pgc (W):
['a.x=a\\"b\\c'] - V09 dul (L):
['a.x=a\\qb'] - V09 gp (L):
['a.x=a\\qb'] - V09 pgc (L):
['a.x=a\\qb'] - V09 iso (L):
['a.x=a\\qb'] - V10 dul (W):
['a.x=first second'] - V10 pgc (W):
['a.x=first \\', 'a.second=true'] - V10 iso (W):
['a.x=first \\', 'a.second=true'] - V10 gog (W):
['a.x=first \n second'] - V11 dul (W):
['a.x=first second'] - V11 pgc (W):
['a.x="first \\', 'a.second"=true'] - V11 iso (W):
['a.x=first \\'] - V11 gog (W):
['a.x=first \n second'] - V12 dul (T):
['a.x=true'] - V12 pgc (T):
['a.x=true'] - V12 iso (T):
['a.x=true'] - V12 gog (W):
['a.x='] - V15 gp (L):
['a.x=open'] - V15 pg2 (L):
['a.x=open'] - V15 pgc (L):
['a.x="open'] - V15 iso (L):
['a.x=open'] - V16 gp (W):
['a.x=a"b c"d'] - V16 pgc (W):
['a.x=a"b c"d'] - V19 dul (W):
['a.x=end\\'] - V19 pgc (W):
['a.x=end\\'] - V19 iso (W):
['a.x=end\\'] - V19 gog (R): error: 2:10: unknown escape sequence
- V20 pgc (W):
['a.x="a "'] - V23 gp (W):
['a.x="a""b"'] - V23 pgc (W):
['a.x="a""b"'] - V27 gp (W):
['a.x=!f() { echo "$1"'] - V27 pgc (W):
['a.x=!f() { echo "$1"'] - V28 gp (W):
['a.x=a \\"b\\" c'] - V28 pgc (W):
['a.x=a \\"b\\" c'] - L08 dul (T):
['diff.word.textconv=docx2txt', 'merge.conflictstyle=zdiff3', 'pull.rebase=true'] - L08 pgc (T):
['diff.word.textconv=docx2txt', 'merge.conflictstyle=zdiff3', 'pull.rebase=true'] - L08 iso (T):
['diff.word.textconv=docx2txt', 'merge.conflictstyle=zdiff3', 'pull.rebase=true'] - L08 gog (W):
['diff.word.textconv=docx2txt', 'merge.conflictstyle=zdiff3', 'pull.rebase=']
References
- git-config documentation, “Configuration File” (syntax, values, subsections). https://git-scm.com/docs/git-config#_configuration_file
- GitHub Security Advisory GHSA-v48j-4xgg-4844 / CVE-2023-29007: Arbitrary configuration injection via
git submodule deinit. https://github.com/git/git/security/advisories/GHSA-v48j-4xgg-4844 - gix-config crate documentation, “Known differences to the git config specification” (version 0.60.0). https://docs.rs/gix-config/0.60.0/gix_config/
- dulwich API documentation,
dulwich.config.ConfigFile. https://dulwich.io/api/dulwich.config.ConfigFile.html - libgit2 issue #5459: “config parsing can break on multiline with multiple quotes”. https://github.com/libgit2/libgit2/issues/5459
- W. M. McKeeman. Differential Testing for Software. Digital Technical Journal 10(1), 1998.
- Subject libraries: jelmer/dulwich, gitpython-developers/GitPython, libgit2/pygit2, jonschlinkert/parse-git-config (with npm/ini), isomorphic-git/isomorphic-git, go-git/go-git, GitoxideLabs/gitoxide (gix-config). https://github.com/jelmer/dulwich ; https://github.com/gitpython-developers/GitPython ; https://github.com/libgit2/pygit2 ; https://github.com/jonschlinkert/parse-git-config ; https://github.com/npm/ini ; https://github.com/isomorphic-git/isomorphic-git ; https://github.com/go-git/go-git ; https://github.com/GitoxideLabs/gitoxide
- git source, config.c (parse_value, get_base_var, get_extended_base_var). https://github.com/git/git/blob/master/config.c
- webpro/awesome-dotfiles, commit a6bf526494f0923adc30f9d4bf631019091155f6. https://github.com/webpro/awesome-[REDACTED_SECRET]
- A. King. Revalidation Under Test: How Fourteen Static-File Servers Evaluate HTTP Preconditions. Pubroot 2026-567, 2026. (Self-citation.)