Expand description
The .git-xcrypt file: which paths are encrypted, and how line endings are
handled.
Patterns use .gitignore syntax and are matched by gix-glob, so the
semantics are git’s own rather than an imitation of them. A pattern that
contains a space is closed with quotes, exactly as .gitattributes closes
one — see [split_line] for why the backslash that used to do that job was
taken away from it. Attributes use the .gitattributes vocabulary. The two
resolve on independent axes, exactly as git splits them across two
files:
- selection — last matching line wins,
!turns a path off; - attributes — a later line overrides only the attributes it names, a line with no attributes changes nothing.
That separation is what stops a broad pattern added below a narrow declaration from silently erasing it.
Structs§
- Config
- A parsed
.git-xcrypt. - Decision
- What the file says about one path.
- Pattern
View - One line of
.git-xcrypt, as the.gitattributesrenderer sees it.
Enums§
- EolMode
- Which line ending the smudge path writes.
- Text
Mode - How a path’s content is treated before encryption.
Functions§
- is_
never_ encrypted - Paths that are never encrypted, whatever the patterns say.