Yuya Nishihara
f9906dc403
cli: add "git.push-new-bookmarks" config knob to enable --allow-new by default
...
This goes against our rule that we shouldn't add config knob that changes the
command behavior, but I don't have any other idea to work around the problem.
Apparently, there are two parties, one who always wants to push new bookmarks,
and the other who mildly prefers to push&track new bookmarks explicitly.
Perhaps, for the former, creation of bookmarks means that the target branches
are marked to be pushed.
The added flag is a simple boolean. "non-tracking-only" behavior #5173 could be
implemented, but I don't want to complicate things. It's a failed attempt to
address the issue without introducing config knob.
Closes #5094
Closes #5173
2025-01-15 07:23:43 +00:00
Ilya Grigoriev
c3c2e882c9
docs config: an advanced example of --config
syntax
...
This seems non-trivial to discover and could be useful for people
transitioning from `--config-toml`.
2025-01-15 05:25:23 +00:00
Ilya Grigoriev
ac1be9374b
docs templates: document the Email type methods in more detail
2025-01-15 05:07:53 +00:00
Yuya Nishihara
d00c02fb07
cli: git: mention git.private-commits in --allow-private help text
...
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 the set is empty by default, --allow-private is noop unless the private
revset is configured by user. Let's clarify that.
2025-01-15 00:28:20 +00:00
Yuya Nishihara
d0f44e8350
cli: git: define default "git.private-commits" in config/misc.toml
2025-01-15 00:28:20 +00:00
Robert Jackson
9ed1fde364
docs: Expose config-schema.json in the docs site
...
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
When landed and published, this will expose the config file as:
https://jj-vcs.github.io/jj/latest/config-schema.json
Exposing the schema like that will allow users to reference in their
`~/.config/jj/config.toml` like:
```toml
"$schema" = 'https://jj-vcs.github.io/jj/latest/config-schema.json '
```
At which point any user with a configured LSP for TOML files will get
inline documentation, suggestions on valid keys, &c.
2025-01-14 13:45:36 +00:00
Yuya Nishihara
be9483b1cf
cargo: remove minus dependency
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-01-14 01:13:13 +00:00
Yuya Nishihara
fadbbcb430
ui: switch builtin pager to streampager
...
According to the discussion on Discord, streampager is still maintained.
It brings more dependencies, but seems more reliable in our use case. For
example, the streampager doesn't consume inputs indefinitely whereas minus
does. We can also use OS-level pipe to redirect child stderr to the pager.
2025-01-14 01:13:13 +00:00
Yuya Nishihara
728652fce3
cargo: add os_pipe dependency
2025-01-14 01:13:13 +00:00
Yuya Nishihara
f81f9f91eb
cargo: add sapling-streampager dependency
...
The WTFPL license is added to the allow list. I've never heard about this
license, but it's basically the same as public domain according to wikipedia.
2025-01-14 01:13:13 +00:00
Yuya Nishihara
367befc1f2
cargo: add missing "windows" feature to crossterm dependency
...
Perhaps, the "windows" feature was enabled through "minus" or "scm-record". If I
removed "minus" in earlier revision, the Windows build of crossterm 0.27.0
failed.
2025-01-14 01:13:13 +00:00
Stephen Jennings
be5eb27f16
fix: Add enabled
config for fix tools
...
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
Adds an optional `fix.tools.TOOL.enabled` config that disables use of a fix
tool (if omitted, the tool is enabled). This is useful for defining tools in
the user's configuration without enabling them for all repositories:
```toml
# ~/.jjconfig.toml
[fix.tools.rustfmt]
enabled = false
command = ["rustfmt", "--emit", "stdout"]
patterns = ["glob:'**/*.rs'"]
```
Then to enable it in a repository:
```shell
$ jj config set --repo fix.tools.rustfmt.enabled true
```
2025-01-13 17:29:49 +00:00
dependabot[bot]
c04b856bfd
cargo: bump the cargo-dependencies group with 4 updates
...
Bumps the cargo-dependencies group with 4 updates: [crossterm](https://github.com/crossterm-rs/crossterm ), [proc-macro2](https://github.com/dtolnay/proc-macro2 ), [thiserror](https://github.com/dtolnay/thiserror ) and [unicode-width](https://github.com/unicode-rs/unicode-width ).
Updates `crossterm` from 0.27.0 to 0.28.1
- [Release notes](https://github.com/crossterm-rs/crossterm/releases )
- [Changelog](https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crossterm-rs/crossterm/commits )
Updates `proc-macro2` from 1.0.92 to 1.0.93
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.92...1.0.93 )
Updates `thiserror` from 2.0.10 to 2.0.11
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.10...2.0.11 )
Updates `unicode-width` from 0.1.14 to 0.2.0
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.14...v0.2.0 )
---
updated-dependencies:
- dependency-name: crossterm
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
- dependency-name: proc-macro2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: unicode-width
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-01-13 16:03:30 +00:00
dependabot[bot]
1e3f1365a3
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 [github/codeql-action](https://github.com/github/codeql-action ).
Updates `taiki-e/install-action` from 2.47.10 to 2.47.12
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](0779861fb4...333ea3e9a4
)
Updates `github/codeql-action` from 3.28.0 to 3.28.1
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](48ab28a6f5...b6a472f63d
)
---
updated-dependencies:
- dependency-name: taiki-e/install-action
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-01-13 16:02:14 +00:00
Jakob Hellermann
8a8d8859ea
cli: autocomplete: complete config values in addition to keys
...
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
Now `jj --config ui.con<TAB><TAB>` will autocomplete
```
ui.conflict-marker-style=diff
ui.conflict-marker-style=snapshot
ui.conflict-marker-style=git
```
Booleans are completed as `false`, `true`, the remaining types are left
without completions.
2025-01-13 14:43:40 +00:00
Jakob Hellermann
270b54209e
cli: autocomplete: complete --config
with possible configuration keys
...
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 trailing `=` is especially nice to have because otherwise fish will
complete the suggestion and insert a space before the cursor.
With the `=`, `jj config --config ui.pagin<TAB>never` works.
2025-01-12 17:53:22 +00:00
Benjamin Tan
c0c582fcee
cli: describe: use CommitRewriter::reparent
...
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 makes it clear that the rewritten commit will have the same tree as
the original commit.
2025-01-12 14:56:26 +00:00
Yuya Nishihara
fe86bee64c
cargo: bump gix to 0.69.1
...
The new track_empty flag is set to the default value. It was introduced by the
following commit, and I think the default behavior is good.
d3f5f27732
2025-01-12 10:01:58 +00:00
Benjamin Tan
9aaf98330b
cli: git push: allow signing commits on push
...
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 adds the `git.sign-on-push` configuration which can be used to
automatically sign unsigned commits before pushing to a Git remote.
2025-01-12 02:33:32 +00:00
Benjamin Tan
d7f064c311
cli: op log: add --reversed
option
...
Closes #4190 .
2025-01-12 01:51:25 +00:00
Benjamin Tan
73d38b5cdc
cli: remove GraphLog::Edge
type
...
`jj_lib::graph::GraphEdge` can be used directly instead.
2025-01-12 01:51:25 +00:00
Benjamin Tan
9b45c90cc5
tests: remove unnecessary format_time_range
template alias
...
This is already set in the test configuration.
2025-01-12 01:51:25 +00:00
Yuya Nishihara
89e0a7021a
cli: git: store absolute remote path in config file
...
The "git" CLI chdir()s to the work tree root, so paths in config file are
usually resolved relative to the workspace root. OTOH, jj doesn't modify the
process environment, so libgit2 resolves remote paths relative to cwd, not to
the workspace root. To mitigate the problem, this patch makes "jj git remote"
sub commands to store resolved path in .git/config. It would be nice if we can
reconfigure in-memory git2 remote object to use absolute paths (or set up
in-memory named remote without writing a config file), but there's no usable
API afaik.
This behavior is different from "git remote add"/"set-url". I don't know the
rationale, but these commands don't resolve relative paths, whereas "git clone"
writes resolved path to .git/config. I think it's more consistent to make all
"jj git" sub commands resolve relative paths.
2025-01-12 01:45:03 +00:00
Yuya Nishihara
20b3d02ff2
cli: git: extract absolute_git_source() as utility function
2025-01-12 01:45:03 +00:00
Waleed Khan
7b47368c24
cli: upgrade scm-record
from v0.4.0 to v0.5.0
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-01-11 18:36:12 +00:00
Benjamin Tan
f02ed0050f
lib: dag_walk: fix doc comment typos
...
This commit fixes more typos unintentionally introduced in d9c68e08
,
when renaming `jj branch` to `jj bookmark`.
2025-01-11 16:19:52 +00:00
Jakob Hellermann
f1e91cdab5
cli: complete: fix stderr during autocomplete of revsets
...
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
When running `cmd.spawn()` rust will by default inherit
the stderr of the parent, so `jj log test<TAB>`, would
print `There is no jj repo in "."` into the prompt.
2025-01-11 12:34:21 +00:00
Yuya Nishihara
98724278c5
templater: add config(name) function
...
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 could be used in order to switch template outputs conditionally, or to
get the default push remote for example.
2025-01-11 01:40:23 +00:00
Yuya Nishihara
4e30fc7215
templater: pass RepoLoader to OperationTemplateLanguage
...
UserSettings will be obtained from there. If operation template supported
"self.repo() -> Repo" method, RepoLoader would be needed. It's equivalent to
Repo in CommitTemplateLanguage.
2025-01-11 01:40:23 +00:00
Yuya Nishihara
83d237a32c
templater: introduce ConfigValue type, port "config list" value to it
...
I'm going to add config(name) accessor, which returns ConfigValue.
2025-01-11 01:40:23 +00:00
Yuya Nishihara
8e5a18b26e
op diff: remove redundant "Change {change_id}" from changed commits graph
...
This makes the graph compact. Short change ids are usually printed as a part
of commit summary. The --no-graph output is a bit harder to parse, but we can
still discriminate entries by change ids.
2025-01-11 01:23:51 +00:00
Stephen Jennings
4ef8ad8445
docs: Explain what elided revisions are
...
A common question is asking how to show elided revisions. This FAQ
explains why revisions are elided and how to display them.
2025-01-11 01:18:45 +00:00
Philip Metzger
c40e5210c4
docs: fix the mkdocs admonition I recently added
...
I didn't check the indentation as it _needs_ to be a codeblock to render correctly.
2025-01-10 23:09:01 +00:00
Philip Metzger
f9dad76512
workflows: fix the pre-release docs workflow
...
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
It contained a check for `repo_owner == 'martinvonz'` which meant that it hasn't run in 4 weeks.
This is another great example showing why current CI systems suck, as it always was "successful" in
doing nothing with no warning whatsoever.
I also only noticed it because I wanted to check my latest doc change on the prerelease site.
2025-01-10 22:05:09 +00:00
Evan Martin
1f24d57325
docs: fix typo in in command
2025-01-10 21:21:08 +00:00
Philip Metzger
038c0bab12
docs: Make dynamic completions a bit more visible
...
In recent times multiple users showed up and were confused _why_ some
completions didn't show up, so make it explicit that they're opt-in
until the Clap upstream has made it so.
Also remove the link to the dynamic completions improvements issue, as it was closed
a while ago.
2025-01-10 20:59:45 +00:00
Benjamin Tan
113984d82c
nix: fix error running rust commands in devshell on macOS
...
The `RUSTFLAGS` enviroment variable needs to be set in a `shellHook` to
allow the command to be interpreted by the shell. Otherwise, it will
just be passed as a string into the `rustc` binary:
```
cargo nextest run --workspace
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Zthreads=0 -C 'link-arg=--ld-path=$(unset' 'DEVELOPER_DIR;' /usr/bin/xcrun --find 'ld)' -C link-arg=-ld_new --target aarch64-apple-darwin --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
--- stderr
error: Unrecognized option: 'find'
```
2025-01-10 20:36:41 +00:00
Benjamin Tan
9f533aeb78
cli: util: rename mangen
to install-man-pages
...
The `jj util install-man-pages` command will generate man pages for all
`jj` subcommands and install them to the provided destination.
Closes #4157 .
2025-01-10 18:54:05 +00:00
Benjamin Tan
f9371ccfd6
cargo: bump clap_mangen to 0.2.25
2025-01-10 18:54:05 +00:00
Bryce Berger
b714592952
nix: clean up flake
...
The build inputs were duplicated, once in packages.jujutsu and again in
devShells.default. This removes the duplication.
2025-01-10 18:15:42 +00:00
dependabot[bot]
f755e8f683
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [clap](https://github.com/clap-rs/clap ) and [syn](https://github.com/dtolnay/syn ).
Updates `clap` from 4.5.25 to 4.5.26
- [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.25...clap_complete-v4.5.26 )
Updates `syn` from 2.0.95 to 2.0.96
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.95...2.0.96 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-01-10 16:48:27 +00:00
dependabot[bot]
792bcb634d
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.47.9 to 2.47.10
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](df5dec2a2f...0779861fb4
)
---
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-01-10 16:47:05 +00:00
Yuya Nishihara
e124404af3
cli: remove handling of deprecated fix.tool-command config
...
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
I originally implemented this as a custom config migration rule, but the next
release is v0.26, so we can just drop support for fix.tool-command.
2025-01-10 05:45:16 +00:00
Yuya Nishihara
b97b7384bb
config: allow inline table syntax in mutation and conditional scope API
...
This is a middle ground. An inline table can still be overwritten or deleted
because it's syntactically a value. It would be annoying if "jj config set
colors.<name> '{ .. }'" couldn't be executed more than once because the existing
item was a table.
#5255
2025-01-10 02:56:21 +00:00
Austin Seipp
1b07df143a
github: don't run dependabot
or gh-readonly-queue
builds twice
...
Like `main`, we don't want to double build these branches since they will be
handled by `merge_group` already.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-01-10 02:44:55 +00:00
Yuya Nishihara
f14a6e6f19
git: remove PartialEq requirement from GitPushError
...
Non-trivial error types usually don't implement Eq/PartialEq.
2025-01-10 01:16:33 +00:00
Yuya Nishihara
ce6119a024
tests: insert insta::allow_duplicates! { .. } per snapshot
...
This might be a bug of insta, but new snapshots were associated with wrong
assertion blocks if allow_duplicates! { .. } contained multiple assertions.
2025-01-10 01:00:09 +00:00
Bryce Berger
84e619cae6
contributing: recommend bacon over cargo-watch
...
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
As of [1], `cargo-watch` is on minimal development and officially
recommends `bacon` as a successor.
[1]: 9f27bc1c96
,
2025-01-09 19:39:54 +00:00
dependabot[bot]
cba1966a77
cargo: bump the cargo-dependencies group with 4 updates
...
Bumps the cargo-dependencies group with 4 updates: [clap](https://github.com/clap-rs/clap ), [clap_complete](https://github.com/clap-rs/clap ), [thiserror](https://github.com/dtolnay/thiserror ) and [tokio](https://github.com/tokio-rs/tokio ).
Updates `clap` from 4.5.24 to 4.5.25
- [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.24...clap_complete-v4.5.25 )
Updates `clap_complete` from 4.5.41 to 4.5.42
- [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.41...clap_complete-v4.5.42 )
Updates `thiserror` from 2.0.9 to 2.0.10
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.9...2.0.10 )
Updates `tokio` from 1.42.0 to 1.43.0
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.42.0...tokio-1.43.0 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: clap_complete
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-01-09 18:28:37 +00:00
dependabot[bot]
d913ec5173
github: bump the github-dependencies group with 2 updates
...
Bumps the github-dependencies group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact ) and [taiki-e/install-action](https://github.com/taiki-e/install-action ).
Updates `actions/upload-artifact` from 4.5.0 to 4.6.0
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](6f51ac03b9...65c4c4a1dd
)
Updates `taiki-e/install-action` from 2.47.8 to 2.47.9
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](08d473f7b2...df5dec2a2f
)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: github-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-01-09 17:59:57 +00:00