mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-11 06:42:47 +00:00
1.2 KiB
1.2 KiB
Filesets
Jujutsu supports a functional language for selecting a set of files. Expressions in this language are called "filesets" (the idea comes from Mercurial). The language consists of file patterns, operators, and functions.
File patterns
The following patterns are supported:
"path"
,path
(the quotes are optional), orcwd:"path"
: Matches cwd-relative path prefix (file or files under directory recursively.)cwd-file:"path"
orfile:"path"
: Matches cwd-relative file (or exact) path.root:"path"
: Matches workspace-relative path prefix (file or files under directory recursively.)root-file:"path"
: Matches workspace-relative file (or exact) path.
Operators
The following operators are supported. x
and y
below can be any fileset
expressions.
x & y
: Matches bothx
andy
.x | y
: Matches eitherx
ory
(or both).x ~ y
: Matchesx
but noty
.~x
: Matches everything butx
.
You can use parentheses to control evaluation order, such as (x & y) | z
or
x & (y | z)
.
Functions
You can also specify patterns by using functions.
all()
: Matches everything.none()
: Matches nothing.