Commit graph

10315 commits

Author SHA1 Message Date
dependabot[bot]
2c92b87303 github: bump the github-dependencies group with 4 updates
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Bumps the github-dependencies group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [taiki-e/install-action](https://github.com/taiki-e/install-action), [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 5.0.0 to 6.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08c6903cd8...1af3b93b68)

Updates `taiki-e/install-action` from 2.62.52 to 2.62.57
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](537c30d2b4...763e3324d4)

Updates `astral-sh/setup-uv` from 7.1.3 to 7.1.4
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](5a7eac68fb...1e862dfacb)

Updates `github/codeql-action` from 4.31.3 to 4.31.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](014f16e7ab...fdbfb4d275)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-dependencies
- dependency-name: taiki-e/install-action
  dependency-version: 2.62.57
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: astral-sh/setup-uv
  dependency-version: 7.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: github/codeql-action
  dependency-version: 4.31.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 17:59:03 +00:00
Ilya Grigoriev
88b76bfdc9 deps: update jsonschema to 0.37.1, adapt to breaking changes
I naively followed the instructions from
https://github.com/Stranger6667/jsonschema/blob/master/MIGRATION.md
2025-11-25 17:58:09 +00:00
Kaiyi Li
0328e0e86b cli: simplify jj fix child process handling
* `Some(x).unwrap()` is not necessary.
* Add a new test to ensure that we handle the fix child process IO
  without deadlock. The new test introduces byte mode to fake-formatter
  which pipe the stdin contents to stdout byte by byte in a streaming
  fashion. The test contents are 512KB, which is larger than page size,
  can trigger the blocking read behavior, and doesn't make the test the
  slowest.
2025-11-25 15:54:00 +00:00
Kaiyi Li
70ddaf8c6f fix: change fake-formatter to not emit ending LF
If the original file doesn't end with LF, the output file won't end with
LF.
2025-11-25 15:54:00 +00:00
Fedor
c2815cdce0 tests: assert operation description text in Git HEAD race test
Add an assertion that verifies the operation description actually
contains "import git head". This prevents the test from being
nullified if the operation description changes in the future.
2025-11-25 14:18:44 +00:00
Fedor
6ec2560c1e cli: avoid locking when transaction has no changes
Check for changes before acquiring the git import/export lock in
`WorkspaceCommandTransaction::finish`.
2025-11-25 14:18:44 +00:00
Fedor
7a296ca1fe cli: fix Git HEAD race condition in colocated repos
Concurrent jj processes in colocated Git repos could create divergent
operations when importing/exporting Git HEAD. This change prevents the
race where two processes both load the repo at operation X, then create
divergent operations Y and Z with the same parent.

Fix by introducing a dedicated lock (.jj/repo/git_import_export.lock)
that serialises Git HEAD and refs import/export. The lock is acquired
in maybe_snapshot_impl() and finish_transaction(). After acquiring the
lock, we reload the repo at the current head to avoid creating operations
based on stale state.
2025-11-25 14:18:44 +00:00
Fedor
aa4d71454d tests: add test for Git HEAD race condition
Add a probabilistic test that spawns two jj processes in parallel:
one running `jj debug snapshot` (imports Git HEAD) and another
running `jj next/prev` (exports Git HEAD). The test creates large
commits to increase the race window and should fail when the race
condition exists. The race condition is fixed in the next commit.
2025-11-25 14:18:44 +00:00
Gaëtan Lehmann
00da178ed0 doc: use metaedit to generate a new change-id
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-25 07:43:16 +00:00
Joseph Lou
0b8ecd5c63 template: Add join() function
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Sometimes it's useful to add a separator between every argument, even if
it's empty.
2025-11-24 15:47:24 +00:00
Vincent Ging Ho Yim
bdd0302b11 docs/FAQ: fix Markdown heading level 2025-11-24 15:35:20 +00:00
Yuya Nishihara
c93682f218 revset: parameterize default string pattern kind, add config knob
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Glob patterns will be enabled by default globally. Since this will be a big
breaking change in revsets, this patch adds a config knob to turn the new
default on/off.
2025-11-24 01:39:32 +00:00
Yuya Nishihara
3b37ed102e tests: specify string pattern prefix, use subject(glob:_) accordingly
Deprecation warnings will be emitted for default "substring:" patterns. This
change will suppress them. Since "glob:" will be the new default, I made these
tests use "glob:" when both "exact:" and "glob:" work.

Tests for the revset filter functions aren't updated.
2025-11-24 01:39:32 +00:00
Yuya Nishihara
4d296a7f9f str_util: map glob pattern with no meta character to exact pattern
Suppose the default is changed to "glob:", literal strings would be parsed by
glob() function. It's still better to treat trivial strings as "exact" patterns.

str_util::is_glob_char() includes backslash unconditionally because we enable
backslash escapes in string patterns.
2025-11-24 01:39:32 +00:00
Yuya Nishihara
19527a0616 cli: filter bookmarks by revsets without constructing intermediate names set
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-23 03:00:12 +00:00
Yuya Nishihara
3f88ea78f1 cli: use revset parser to parse bookmark/tag list patterns
These commands are easy ones. The other commands error out if one of the
patterns doesn't match anything. I'll make them warn only exact patterns instead
to keep the implementation simple. I'll also add warnings to these list
commands.
2025-11-23 03:00:12 +00:00
Yuya Nishihara
afd44830e4 revset: add string expression parser for command arguments
The default patterns differ between revsets and command arguments, but they'll
be unified to "glob" later. For now, parse_string_expression() should be used
only for command arguments.
2025-11-23 03:00:12 +00:00
Yuya Nishihara
69c36fe1b9 revset: restore parsing rule for expression without "modifier:" syntax
The new parse_program() will allow us to parse top-level string patterns with no
parentheses. This patch also replaces a few callers of the old parse_program().
When we drop support for the all: modifier syntax, parse_program_with_modifier()
will be replaced entirely.
2025-11-23 03:00:12 +00:00
Hubert Lefevre
e0a3ceb374 docs: interop => interoperability
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Use the full length terminology to assure good comprehension.
2025-11-22 22:45:06 +00:00
Hubert Lefevre
7627474588 docs: Use "repo" instead of "repository"
Changed to be consistent, at least in the same file, and avoid
using sometime repository/repositories and other times repo/repos.
"repo/repos" is currently the most use terminology.
2025-11-22 22:45:06 +00:00
Hubert Lefevre
c82728fe2e docs: Fix typo in core tenets
Correction made according to the other items on the list.

Closes #8004
2025-11-22 22:45:06 +00:00
ase
c598135f64 docs: clarify that squash -o/A/B creates a new commit 2025-11-22 22:24:24 +00:00
David Higgs
1ddada1a24 tests: exercise more tracking conflict cases
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-22 14:38:53 +00:00
David Higgs
58edd0f731 tests: exercise renaming an untracked bookmark 2025-11-22 14:38:53 +00:00
David Higgs
7afa6273ca tests: exercise tracking non-existent remote bookmarks 2025-11-22 14:38:53 +00:00
David Higgs
062f950be3 tests: exercise moving multiple bookmarks by name 2025-11-22 14:38:53 +00:00
David Higgs
de6a835a66 tests: exercise bookmark (re)sorting by name 2025-11-22 14:38:53 +00:00
Remo Senekowitsch
244cbf7d45 cli git push: deprecate --allow-new
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-22 08:18:44 +00:00
Remo Senekowitsch
faf5512482 tests: replace --allow-new with auto-track-bookmarks
This paves the way to deprecate the `--allow-new` flag on `jj git push`
without adding lots of deprecation warnings to test output snapshots.

The behavior of some tests is slightly changed, because
auto-track-bookmarks tracks all bookmarks at creation time, not when
they're about to be pushed. Where appropriate, I tracked bookmarks
manually instead of via the auto-track config.
2025-11-22 08:18:44 +00:00
Remo Senekowitsch
0bb55c6252 config: deprecate git.push-new-bookmarks 2025-11-22 07:09:29 +00:00
Yuya Nishihara
54511ee3fd tests: stop relying on auto tracking when setting up commit template test
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Since this is a test for template output of various bookmark states, it's better
to not rely on implicit configuration. Local bookmark "new-bookmark" wasn't
tracked before.
2025-11-21 15:31:35 +00:00
Yuya Nishihara
a7a4ed033a git: move GitSettings out of settings module
This type wouldn't be needed if the "git" feature is disabled.
2025-11-21 15:04:09 +00:00
Yuya Nishihara
0361059f65 git: move git.colocate to CLI config
This is the option for "jj git" subcommands.
2025-11-21 15:04:09 +00:00
Remo Senekowitsch
5ada0f7ff2 config: deprecate git.auto-local-bookmark
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-21 05:15:55 +00:00
Remo Senekowitsch
e4d45dda34 tests: replace auto-local-bookmark with auto-track-bookmarks
This paves the way to deprecate `git.auto-local-bookmark` without
adding lots of deprecation warnings to test output snapshots.

The behavior of some tests is slightly changed, because
auto-track-bookmarks also tracks bookmarks that were created locally.
I think it just shows up in output snapshots as absent-tracked
bookmarks, without affecting what the test is about.
2025-11-21 05:15:55 +00:00
Yuya Nishihara
5330081be2 templates: ensure empty description in compact_full_description is terminated
I thought the lack of newline would be intentional when I added explicit ++ "\n"
by 4495574171 "templater: do not implicitly add final newline character to
commit.description", but that seems wrong. The compact_full_description template
would be largely copied from the compact template, and the author wouldn't
notice that .first_line() strips newline?

Suppose this template is closer to comfortable/detailed templates, a blank line
should also be inserted to the root commit.

Fixes #8073
2025-11-21 01:48:23 +00:00
abgox
bb3b61d7e1 docs: add PSCompletions as PowerShell's completion solutions
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-20 14:56:53 +00:00
Remo Senekowitsch
248effb8ff mise: add more test tasks
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
The behavior of cargo-insta can be customized with flags like --check,
--review and --accept, which is often convenient.
2025-11-19 18:14:04 +00:00
Gaëtan Lehmann
08fd73d873 mise: improve 'mise run check:*' usability
by only showing failed and slow tests. When only running
the 'mise test', the currently running tests are displayed
2025-11-19 17:49:49 +00:00
Remo Senekowitsch
5dcbd54ea2 complete: restore erroneously deleted comment
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
The comment was deleted in e22bc2d391,
which removed code related to the legacy macos config dir. However, the
comment was related to `jj_lib::config::migrate()`, so it shouldn't have
been deleted.
2025-11-19 11:19:48 +00:00
Björn Kautler
a76f2c4dac docs: fix markdown sublists for the produced web pages 2025-11-19 03:53:18 +00:00
Martin von Zweigbergk
2518add7cf glossary: fix typo ("work" -> "word")
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-18 20:10:16 +00:00
Remo Senekowitsch
e22bc2d391 cli: remove legacy macos config dir 2025-11-18 17:30:17 +00:00
Remo Senekowitsch
4216aa6758 config: add remotes.<name>.auto-track-bookmarks
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
This configuration allows users to express a set of bookmarks that
should be automatically tracked when first encountered. This includes
on clone, fetch, create and set.

Until now, the configuration values `git.push-new-bookmarks` and
`git.auto-local-bookmark` fulfilled parts of those use cases. However,
both options represent an "all or nothing" approach. By turning them on,
users risk tracking and pushing more bookmarks than desired.

By using a bookmark pattern, users can express that they want to
auto-track bookmarks that belong to them (e.g. `glob:my-name/*`).
2025-11-18 15:10:56 +00:00
Hubert Lefevre
7d43027265 cli: complete: Filter out bad lines
For completion of workspace names, we are parsing a content where each
line should have a tab, separating a candidate workspace name from the
working copy commit description, serving as help text for the value.

If we cannot parse one of the lines, instead of proposing a bad value,
print an error message and ignore the line.
2025-11-18 15:10:09 +00:00
Hubert Lefevre
0b3cbd9809 cli: complete: Fix completion for workspace
The character used for splitting the argument from its description /
help text was incorrect. In the template syntax used to obtain those
information, a tab ('\t') was used, while the parsing split the line
base on the pattern ": ".

The result was that the suggested argument for completion was
systematically incorrect, as the help text is systematically added, with
a default to "(no description set)".

The test was also incorrect, the expected pattern, for each line, was
'<value>\t<description>' since <value> was actually
`<value>\t<description>` the test was badly configured to expect
`<value>\t<description>\t'.
2025-11-18 15:10:09 +00:00
Hubert Lefevre
41a63aaf6e cli: complete: Clean line too long
Split the long template argument, which makes the line go over 100
characters, on several lines.
2025-11-18 15:10:09 +00:00
Hubert Lefevre
60ed324445 cli: complete: Prefer long-options
Long options are self-explanatory compared to short ones.

This make the choice in options consistent with the rest of the file,
where --template is systematically used over -T.
2025-11-18 15:10:09 +00:00
Gaëtan Lehmann
40c16fc711 prev/next: add an error when not using --edit and the working-copy has children
We shouldn't be in that case, and it can lead to confusing situations with next
completely switching branch.

fix: #7046
2025-11-18 10:19:38 +00:00
Björn Kautler
ddc6ed750d docs: fix some typos and blur in Git compatibility page
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-18 03:23:02 +00:00