-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Extract well-known revset aliases to their own page
- Loading branch information
Showing
8 changed files
with
58 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Revset aliases | ||
|
||
Some revset aliases are built-in to Jujutsu and used to control its behavior. | ||
|
||
See [Revset language](revsets.md) for information about the revset syntax. | ||
|
||
## `trunk()` | ||
|
||
Most teams have a main line of development, usually named `main`, `master`, or | ||
`trunk`. The `trunk()` alias resolves to the bookmark for this branch. | ||
|
||
This alias is used in other built-in aliases, it is not used directly by | ||
Jujutsu. | ||
|
||
When Jujutsu clones a Git repository, it uses the remote's HEAD to set this | ||
revset aliases in the repo's config. | ||
|
||
```toml | ||
[revset-aliases] | ||
"trunk()" = "dev@origin" | ||
``` | ||
|
||
## `immutable_heads()` | ||
|
||
Controls which commits are immutable. Jujutsu will refuse to modify these | ||
commits unless `--ignore-immutable` is specified. | ||
|
||
Many teams have a main line of development, usually named `main`, `master`, or | ||
`trunk`. | ||
|
||
Ancestors of the configured set are also immutable. The root commit is always | ||
immutable even if the set is empty. | ||
|
||
Default value: `builtin_immutable_heads()`, which in turn is defined as | ||
`present(trunk()) | tags() | untracked_remote_bookmarks()`. | ||
|
||
For example, to also consider the `release@origin` bookmark immutable: | ||
|
||
```toml | ||
[revset-aliases] | ||
"immutable_heads()" = "builtin_immutable_heads() | release@origin" | ||
``` | ||
|
||
To prevent rewriting commits authored by other users: | ||
|
||
```toml | ||
# The `trunk().. &` bit is an optimization to scan for non-`mine()` commits | ||
# only among commits that are not in `trunk()`. | ||
[revset-aliases] | ||
"immutable_heads()" = "builtin_immutable_heads() | (trunk().. & ~mine())" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters