795 Commits

Author SHA1 Message Date
Philip Metzger
07c92d2d29
docs: Document the existing deprecation policy
We recently renamed `jj util mangen` to `jj install-manpages` without a
deprecation warning, as it was missed in the initial PR. Waleed then
fixed it in a follow-up, which led to a longer discussion in the Discord which revealed that
not everyone was aware of it and _what_ requires a warning based deprecation.

This initially categorizes the policy into user-visible UX changes and small
impact renames, like for a small usergroup like packagers and third-party dependencies.
If we have more hickups with users, this can be expanded.
2025-04-04 22:19:31 +02:00
Nicole Patricia Mazzuca
02687ac7e5 docs: standardize on .method() syntax
In docs/templates.md, the Commit type and Operation type looked like:

`method() -> ReturnType`

rather than everything else, which looks like:

`.method() -> ReturnType`

This commit changes the Commit and Operation types to look more like the
rest of the documentation.
2025-04-04 13:58:33 +00:00
Waleed Khan
5a63fd9628 docs: update contributor command
- Now computes the latest tag automatically in the first suggested command.
- Now excludes dependabot.

I used the command to generate the list of contributors in the v0.28.0 release commit.
2025-04-02 23:52:10 +00:00
Kenyon Ralph
a1d2246cc2 FAQ: fix typo 2025-04-02 21:05:05 +00:00
Nick Pupko
2ba756cc1d docs: replace outdated method in the Signature type
The `username()` is deprecated, but `email().local()` technically does the same now
2025-04-02 14:20:01 +00:00
Yuya Nishihara
fd05b6f4cb cli: make description template insert blank line if old description was empty
This helps detect whether the last line is "JJ:" instruction or not. It seems
also nice that I don't have to insert newline to reflow the edited paragraph.
2025-04-01 02:02:02 +00:00
Martin von Zweigbergk
4930ee7601 faq: in entry about reordering commits, mention rebase -A/-B 2025-03-31 21:46:51 +00:00
Robin Stocker
0456701e18 cli: Print @ and @- in status and print_updated_working_copy_stats
This helps newcomers learn/remember what @ and @- stand for.
2025-03-31 11:57:04 +00:00
Yuya Nishihara
3f5f872204 view: rename workspace "id" to "name"
This matches the current implementation.
2025-03-31 03:39:29 +00:00
Yuya Nishihara
e66c545438 view: replace WorkspaceId by string-like newtypes
I think this makes more sense because WorkspaceId is currently a human-readable
name. In error/status messages, workspace names are now printed in revset
syntax.

New WorkspaceId types do not implement Default. It would be weird if string-like
type had non-empty Default::default(). The DEFAULT constant is provided instead.
2025-03-31 03:39:29 +00:00
Yuya Nishihara
f87db58617 view: rename RemoteRefState::Tracking to Tracked
In jj's model, a local bookmark "tracks" remote bookmarks. It's wrong to call
a remote bookmark state as "tracking".
2025-03-31 01:41:31 +00:00
Martin von Zweigbergk
cb8d8d0eef paid_contributors: torquestomp has left Google
They are technically employed for another week or so, but they're on
vacation. Removing now before I forget.
2025-03-29 17:33:47 +00:00
Vincent Ging Ho Yim
25dbce663e docs/revsets: fix fork_point() example
In the diagram, E has parent B, and D has parents B and C, so the fork point of E and D
(the most downstream common ancestor of these commits) should be B rather than A.
2025-03-29 13:08:01 +00:00
Vincent Ging Ho Yim
80d81b5d13 docs/revsets: add missing node glyphs in diagrams 2025-03-29 13:08:01 +00:00
Daniel Luz
05c77a853f formatter: add support for reversing colors 2025-03-25 15:54:22 +00:00
Yuya Nishihara
9a615b5b62 config: relax bare string rule to accept middle apostrophes, etc.
Closes #5748
2025-03-22 09:00:44 +00:00
Martin von Zweigbergk
be0ad55309 doc: update some references to "the native backend" 2025-03-21 16:27:51 +00:00
Caleb White
680c41c30f signing: add gpgsm backend
The adds support for PKCS#12 certificates through the `gpgsm` backend.

Closes #5856
2025-03-20 17:01:39 +00:00
Raphael Borun Das Gupta
d1242635c6 docs: fix spelling of «NixOS»
The name «NixOS» doesn't have a space in it.
2025-03-19 22:46:34 +00:00
Vincent Ging Ho Yim
7e1433a333 docs: fix missed rename of LocalBackend to SimpleBackend
This is a follow-up to f8ab8a0e.
2025-03-18 06:52:00 +00:00
Vincent Ging Ho Yim
a523503dbc docs: update types diagram to reflect rename of LocalBackend to SimpleBackend
This is a follow-up to f8ab8a0e.
2025-03-18 06:52:00 +00:00
Johannes Altmanninger
4c01ed0746 docs: fish shell enables completions by default
To avoid redundant computation, users who run `COMPLETE=fish jj | source`
in their ~/.config/fish/config.fish should eventually remove that, or move it
to ~/.config/fish/completions/jj.fish which overrides the default completions.

Ref: https://github.com/fish-shell/fish-shell/pull/11046
2025-03-17 18:37:48 +00:00
Philip Metzger
f8ab8a0e72 lib: rename the LocalBackend to SimpleBackend
This makes it clear to source code readers, that it isn't the _native backend_ the project
talks about in the Roadmap.
2025-03-17 17:17:11 +00:00
Ilya Grigoriev
d1c2a1c578 config docs: touch up platform-specific config location docs 2025-03-16 04:14:15 +00:00
Baltasar Dinis
142ba74427 cli: change debug logging behaviour to whitelist jj crates
The current behaviour means (transitively) dependent crates' debug logs end up
in our logs when `--debug` is active.

The biggest offender here is `globset`, imported from the `ignore
crate`. These logs are extremely noisy and mostly irrelevant from our usecase.

This commit changes this behaviour to whitelist `jj` related debug logs,
while allowing more debugging to come from env vars
2025-03-16 04:12:01 +00:00
Caleb White
a4ef8b3e4d sign: gpg: automatically use user email as signing key
If a signing key is not configured, the user's email will be
used as the signing key. This aligns with `git`'s behavior
and allows the users to not specify the key in their configs
given that they have a key associated with their email.
2025-03-16 02:19:51 +00:00
Caleb White
669bfaf09b cli: config: support multiple user configuration files
Multiple user configs are now supported and are loaded in the following precedence order:
  - `$HOME/.jjconfig.toml`
  - `$XDG_CONFIG_HOME/jj/config.toml`
  - `$XDG_CONFIG_HOME/jj/conf.d/*.toml`

Which removes the need to set `JJ_CONFIG` for a multi-file approach.
Later files override earlier files and the `JJ_CONFIG` environment
variable can be used to override the default paths.

The `JJ_CONFIG` environment variable can now contain multiple paths separated
by a colon (or semicolon on Windows).
2025-03-15 18:43:42 +00:00
Yuya Nishihara
896424db76 templater: rename RefName type to CommitRef
I'm thinking of adding RefName(str) and RemoteName(str) newtypes, and the
templater type name would conflict with that. Since the templater RefName type
is basically a (name, target) pair, I think it should be called a "Ref", and I
added "Commit" prefix for disambiguation.

This isn't a breaking change since template type names only appear in docs and
error messages.
2025-03-14 14:58:29 +00:00
Caleb White
67e17d5474 cli: config list: show origin of config values
Adds a `templates.config.list` config option to control whether the
detailed list is shown or not.

The `builtin_config_list_detailed` template adds the config origin to
the end of the line for each config value in the list. Options coming
from files will show the file path.
2025-03-13 23:59:45 +00:00
Lucas Garron
4e22902249 Replace the PNG logo with a vector SVG version.
This version is significantly smaller and crisp at any resolution.

Update docs/index.md
2025-03-11 22:44:13 +00:00
Martin von Zweigbergk
fe846d69d4 faq: in entry about default jj log revset, explain rationale
The FAQ entry explaining why `jj log` doesn't show all commits
explained that the behavior is configurable but it didn't explain what
the rationale for not showing all commits is. Users coming from Git
are used to seeing all commits and probably read this FAQ entry to
find an answer. We don't want them to just update their config without
understanding why we have the default we have.
2025-03-11 17:55:32 +00:00
Yuya Nishihara
d37a5b1b74 fileset, revset: settle on optionally-quoted pattern syntax
Suppose revsets and filesets are primarily used in command shell, it would be
annoying if quoting is required in addition to the shell quoting. We might also
want to relax the revset parser to allow bare * in glob string.

Closes #2101
2025-03-11 08:35:27 +00:00
Martin von Zweigbergk
dc7216d73a cli: diff: support multiple revisions to -r 2025-03-11 06:27:51 +00:00
Ilya Grigoriev
bc06e66313 fileset docs: edits to quoting and file pattern instructions
- Swapped `file:"path"` and `cwd-file:"path"` for consistency with the first line

- Created a labeled section for quoting rules

- Elaborated on the quoting rules in the beginning of file pattern section.
2025-03-11 03:00:58 +00:00
Anton Älgmyr
a209f522ab docs: Update documentation wrt JJ_CONFIG and --when/--scope
This is hidden gem of a feature, especially in combination.

`JJ_CONFIG` being a directory allows loading multiple TOML config files.
`--when` can be used on the top level, which can lend itself to a much
cleaner config than `[[--scope]]` tables.
2025-03-08 11:19:39 +00:00
Brandon Hall
e71650a27a Update community_tools.md
Added a link and blurb about the took VS Code extension Jujutsu Kaizen
2025-03-07 01:13:25 +00:00
Martin von Zweigbergk
9aeb13488c docs: correct description of tracking of ignored files 2025-03-06 22:29:05 +00:00
George Christou
b7f7d923bd config: rename core.watchman.register_snapshot_trigger 2025-03-06 08:42:35 +00:00
Ilya Grigoriev
1ede79c483 MSRV: Update to 1.84 and run clippy --fix, cargo fmt
The CI seems to correctly use rustc 1.84.1 (and not 1.84.0) with this.

For reference, we last updated the MSRV to 1.76 in 5b517b5. According to
https://releases.rs/docs/1.76.0/, this was when it barely became stable.

`flake.nix` seems to be using a nightly toolchain now, so it seems there
is no need to update the version there.

The more precise clippy command used was:

cargo clippy --workspace --all-targets --fix
2025-03-06 07:24:28 +00:00
Ilya Grigoriev
2bcf0384e2 FAQ: detailed example for the "accidentally changed files in the wrong commit" question
It was requested on Discord once.

The result is almost a tutorial; we could consider actually moving it into the
tutorial and providing a link in the FAQ. That could be done separately.

The `jj` commands outputs are faked in a few, hopefully inconspicuous, ways.
Hopefully, this is not distracting.
2025-03-05 23:46:32 +00:00
Baltasar Dinis
61f3732ad8 docs: update the docs to best describe the authentication compatibility 2025-03-05 04:33:57 +00:00
Scott Taylor
a95281f9ca docs: fix syntax highlighting for conflicts.md
I think the `diff` syntax highlighting makes these examples harder to
read since it's inconsistent and wouldn't appear in real conflicts.
2025-03-03 22:42:14 +00:00
Burak Varlı
7b52ff51f0 cli git fetch: support string pattern syntax in remote option
Signed-off-by: Burak Varlı <unexge@gmail.com>
2025-03-01 12:11:19 +00:00
pylbrecht
f7ceac3bf4 unsign: implement jj unsign command
The output of `jj unsign` is based on that of `jj abandon`.

We output warnings when unsigning commits, which are not authored by the
user. This is encouraging to use `jj undo`, in case one unintentionally
drops signatures of others.

---

Co-authored-by: julienvincent <m@julienvincent.io>
Co-authored-by: necauqua <him@necauq.ua>
2025-02-25 13:36:44 +00:00
Anton Bulakh
76f79961fb sign: implement the jj sign command
We always sign commits. This means commits, which are already signed,
will be resigned. While this is cumbersome for people using hardware
devices for signatures, we cannot reliably check if a commit is already
signed at the moment (see https://github.com/jj-vcs/jj/issues/5786).

We output warnings when signing commits, which are not authored by the
user. This is encouraging to use `jj undo`, in case one unintentionally
signs commits of others.

The output of `jj sign` is based on that of `jj abandon`.

---

Co-authored-by: julienvincent <m@julienvincent.io>
Co-authored-by: necauqua <him@necauq.ua>
2025-02-25 13:36:44 +00:00
Bryce Berger
708e1c58cd cli: improve hint message when suggesting --ignore-immutable
There have been a number of users confused about why
their commits are immutable, or what to do about it, ex.
[https://github.com/jj-vcs/jj/discussions/5659].

Separately, I feel that the cli is too quick to suggest
`--ignore-immutable`, without context of the consequences. A new user
could see that the command is failing, see a helpful hint to make it not
fail, apply it and move on. This has wildly different consequences, from
`jj squash --into someone_elses_branch@origin` rewriting a single commit,
to `jj edit 'root()+'` rewriting your entire history.

This commit changes the immutable hint by doing the following:

* Adds a short description of what immutable commits are used for, and a
  link to the relevant docs, to the hint message.
* Shows the number of immutable commits that would be rewritten if
  the operation had succeeded.
* Removes the suggestion to use `--ignore-immutable`.
2025-02-23 02:24:43 +00:00
George Christou
e1abaca21c templater: add trim methods to String type 2025-02-21 21:23:11 +00:00
Andrew Gilbert
5dac0ef4d1 docs templates: add link to templates toml file 2025-02-17 21:02:23 +00:00
Alain Leufroy
fa3254b4a7 templates: add hook points for users to customize the default operation id
Same as `format_short_change_id`.

We can't use `format_short_id` because `operation.id()` does not have `shortest()` method.
2025-02-17 09:08:51 +00:00
maan2003
ec6f8278fd signing: allow specifying sign behavior 2025-02-16 05:56:52 +00:00