8719 Commits

Author SHA1 Message Date
Ilya Grigoriev
5ca7dca3bf cli: warn on startup for vimdiff used as a diff editor
This is more visible than a comment. Once this is supported, I'm
considering removing this entirely. I doubt many people intentionally
use it, but if so, they can easily remove this warning in their config.

Another option would be to set up a file-by-file diff editing mode,
for which vimdiff would be fine.
2025-04-01 14:31:23 -07:00
dependabot[bot]
e67eba3abf cargo: bump the cargo-dependencies group across 1 directory with 2 updates
Bumps the cargo-dependencies group with 2 updates in the / directory: [clap](https://github.com/clap-rs/clap) and [rustix](https://github.com/bytecodealliance/rustix).


Updates `clap` from 4.5.34 to 4.5.35
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.34...clap_complete-v4.5.35)

Updates `rustix` from 1.0.3 to 1.0.5
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGES.md)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v1.0.3...v1.0.5)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.35
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: rustix
  dependency-version: 1.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 18:48:41 +00:00
dependabot[bot]
00eae152b1 github: bump taiki-e/install-action in the github-dependencies group
Bumps the github-dependencies group with 1 update: [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `taiki-e/install-action` from 2.49.40 to 2.49.43
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](daa3c1f1f9...575f713d02)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 17:46:43 +00:00
Ilya Grigoriev
ecde53c5bb cli completion: add completion for jj git push --named
Follow-up to https://github.com/jj-vcs/jj/pull/5698
2025-04-01 16:56:33 +00:00
Remo Senekowitsch
fb1a27ff09 cli: require --deleted to push deleted bookmarks 2025-04-01 15:58:50 +00:00
Yuya Nishihara
5db62a6b96 tests: port test_revset_output.rs to TestWorkDir API 2025-04-01 15:00:17 +00:00
Yuya Nishihara
f1a52d8504 tests: port test_revert_command.rs to TestWorkDir API 2025-04-01 15:00:17 +00:00
Yuya Nishihara
4d4de68c91 tests: port test_restore_command.rs to TestWorkDir API 2025-04-01 15:00:17 +00:00
Yuya Nishihara
3ba2ea7ace tests: port test_resolve_command.rs to TestWorkDir API 2025-04-01 15:00:17 +00:00
Yuya Nishihara
169a8b3f35 tests: set up fake editor early in test_{resolve,restore}_command.rs
This helps avoid borrowing issue in the next patch.
2025-04-01 15:00:17 +00:00
Yuya Nishihara
4bcebe678c cli: pad empty description intro/instruction lines with "JJ:"
Since 7618b52b "cli: consider 'JJ:' lines as comments also when not followed by
space", lines starting with "JJ:" (without space) are also ignored. We can
simply add "JJ:" prefix to empty intro/instruction lines.

Closes #5484
2025-04-01 02:02:02 +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
Ilya Grigoriev
bb902b69b5 Revert "git_backend: stop writing tree ids to proto"
This reverts commit b8ca9ae and adds a comment.

In commit 4d42604 (a year ago), we started writing the trees involved in
conflicted commits to the Git commit object in addition to the proto
storage. We validated that the two record matched when reading commits
until as recently as f7b14be (about a week ago). Just after that, in
commit b8ca9ae, we stopped writing the tree ids to the proto storage.
That means that any version of jj between 4d42604 and f7b14be would
error fail when reading a conflicted commit created by new versions.
While we don't guarantee forward compatibility, it's easy to do so here,
so let's be friendly to older versions by rolling back b8ca9ae so we
continue to write the conflicted tree ids to both places for a while
more.

(Thanks to Martin for the detailed explanation!)

Fixes https://github.com/jj-vcs/jj/issues/6185
2025-03-31 23:19:21 +00:00
Martin von Zweigbergk
4930ee7601 faq: in entry about reordering commits, mention rebase -A/-B 2025-03-31 21:46:51 +00:00
dependabot[bot]
23a3bd3dce cargo: bump once_cell in the cargo-dependencies group
Bumps the cargo-dependencies group with 1 update: [once_cell](https://github.com/matklad/once_cell).


Updates `once_cell` from 1.21.2 to 1.21.3
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.21.2...v1.21.3)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 18:21:12 +00:00
dependabot[bot]
ccc5dc4a2a github: bump the github-dependencies group with 2 updates
Bumps the github-dependencies group with 2 updates: [taiki-e/install-action](https://github.com/taiki-e/install-action) and [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv).


Updates `taiki-e/install-action` from 2.49.37 to 2.49.40
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](63f2419bb6...daa3c1f1f9)

Updates `astral-sh/setup-uv` from 5.4.0 to 5.4.1
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](22695119d7...0c5e2b8115)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: astral-sh/setup-uv
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 18:20:54 +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
Robin Stocker
2d9c72ffb1 cli/tests: Prevent git.subprocess from reading outside git config
A subset of cli tests could fail if the system /etc/gitconfig had
configuration interfering with the tests. The cause seems to be running
of `jj` commands that would in turn use a `git` subprocess.

Fix this by setting `GIT_CONFIG_SYSTEM` and `GIT_CONFIG_GLOBAL`, like
in `hermetic_git`.

Fixes #6159
2025-03-31 10:46:57 +00:00
Yuya Nishihara
60372ead43 tests: port test_repo_change_report.rs to TestWorkDir API 2025-03-31 10:35:36 +00:00
Yuya Nishihara
d15aa8c1c1 tests: port test_rebase_command.rs to TestWorkDir API 2025-03-31 10:35:36 +00:00
Yuya Nishihara
f3ed4cfed6 tests: port test_parallelize_command.rs to TestWorkDir API 2025-03-31 10:35:36 +00:00
Yuya Nishihara
da8ff3083c tests: port test_operations.rs to TestWorkDir API 2025-03-31 10:35:36 +00:00
Yuya Nishihara
022147e4f4 diff: use BString more consistently in rendering functions 2025-03-31 10:34:14 +00:00
Yuya Nishihara
a3a59abe74 diff: pass left/right contents and line number pairs by array
When rendering diff of conflicts, it might make sense to show diff of negative
(or base) terms with "removed"/"added" labels swapped. For example, diffs
between A and B-C+D can be rendered as

  {left, right} = {A (-), B (+)}, {A (+), C (-)}, {A (-), D (+)}

by padding -A+A to the left side. To achieve that, I'm thinking of adding
labels: [&str; 2] parameter. This patch will help keep function arguments more
consistent there.

FWIW, I also tried rendering in {A (-), B (+)}, {C (-), D (+)} forms. This
seemed not intuitive because, when diffing, we compare two distinct states. In
the example above, the diff {C, D} should be considered an internal state at the
right side, not the states pair to be diffed.
2025-03-31 10:34:14 +00:00
Ilya Grigoriev
9db0739320 cli git push: new --named NAME=REVISION argument to create and immediately push bookmark
Fixes #5472
2025-03-31 03:51:28 +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
a08d53bef8 cli: do not panic on non-utf-8 workspace name to add 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
Yuya Nishihara
15e5bf7188 changelog: restore "Fixed bugs" heading removed at 68ef93ebd6e0 2025-03-30 02:17:00 +00:00
Yuya Nishihara
e4982a9c33 git: report HEAD export failure as warning
It's safe to commit transaction even if HEAD couldn't be updated due to
concurrent changes.

Closes #6098
2025-03-30 01:46:00 +00:00
Yuya Nishihara
cd1ee943e6 git: split GitResetHeadError, add UpdateHeadRef variant
This helps handle "HEAD" export failure differently. At this point, the set of
error variants look distinct enough to split the error types.
2025-03-30 01:46:00 +00:00
Yuya Nishihara
4beaa6c509 cli: don't map GitExportError to internal error
It seemed inconsistent that only GitExportError was translated to an internal
error. There are various reasons that triggers git::export_refs()/reset_head()
failure, and some of them are environmental error.
2025-03-30 01:46:00 +00:00
Yuya Nishihara
c33be3839d git: remove redundant error context messages, rename variants
Wrapped errors are usually displayed after "Failed to import refs ...", etc., so
the context is obvious. I also removed "Internal"/"Error" for consistency.
2025-03-30 01:46:00 +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
Yuya Nishihara
69f278a581 tests: port test_next_prev_commands.rs to TestWorkDir API 2025-03-29 14:42:08 +00:00
Yuya Nishihara
1df956bfb5 tests: port test_new_command.rs to TestWorkDir API 2025-03-29 14:42:08 +00:00
Yuya Nishihara
511d0bd499 tests: port test_log_command.rs to TestWorkDir API 2025-03-29 14:42:08 +00:00
Yuya Nishihara
7f1bc15469 tests: port test_interdiff_command.rs to TestWorkDir API 2025-03-29 14:42:08 +00:00
Yuya Nishihara
76283dc4b6 tests: port test_immutable_commits.rs to TestWorkDir API 2025-03-29 14:42:08 +00:00
Jakob Hellermann
68ef93ebd6 cli: add revsets.log-graph-prioritize setting
The option will be used to prioritize branches of the `jj log` graph to
be displayed on the left.
This can make them more readable in some situations.
An example would be
```
[revsets]
log-graph-prioritize = "coalesce(description("megamerge\n"), trunk())"
```
2025-03-29 13:50:55 +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
Vincent Ging Ho Yim
0cd352e16a mkdocs: rename docs page name for 'Sapling comparison' for consistency with 'Git comparison' 2025-03-29 05:02:38 +00:00
Vincent Ging Ho Yim
73e87bcf65 mkdocs: use sentence case consistently for docs page names 2025-03-29 05:02:38 +00:00
Vincent Ging Ho Yim
53e8218dca mkdocs: remove quotes surrounding docs page names in YAML fields
This avoids having to escape double and single quotes used within page names. One page has double quotes in its name in the current state, and another will have a single quote in its name in the next commit.
2025-03-29 05:02:38 +00:00
Vincent Ging Ho Yim
2c76054136 mkdocs: use single quotes consistently in YAML values
I don't have a preference for single vs double quotes, but currently `mkdocs.yml` mostly uses single quotes for YAML values.
2025-03-29 05:02:38 +00:00
Vincent Ging Ho Yim
2eb1d5b3e4 mkdocs: standardise indentation 2025-03-29 05:02:38 +00:00
dependabot[bot]
6327cc1da2 cargo: bump once_cell in the cargo-dependencies group
Bumps the cargo-dependencies group with 1 update: [once_cell](https://github.com/matklad/once_cell).


Updates `once_cell` from 1.21.1 to 1.21.2
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.21.1...v1.21.2)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 19:16:12 +00:00
Martin von Zweigbergk
5a90264cff github: add a CODEOWNERS file with only the maintainers in
As discussed several times before, we want to restrict permission to
approve PRs to the maintainers only. This patch adds a GitHub
CODEOWNERS file for that purpose. Once this has been merged, I'm going
to update the rulesets to make PRs requires approval from a
maintainer.
2025-03-28 16:52:50 +00:00