Emily
fe9e71b90e
git: remove .gitmodules
parsing code
...
This is redundant with `gix`’s native API and not used by anything
but a hidden debugging command.
2025-03-11 02:37:13 +00:00
Yuya Nishihara
1a8d2f5195
tests: use TestWorkDir in test_abandon_command.rs
2025-03-11 01:23:13 +00:00
Yuya Nishihara
e802c4b8fe
tests: move current_operation_id() to TestWorkDir
2025-03-11 01:23:13 +00:00
Yuya Nishihara
61a449554b
tests: pass &TestWorkDir to create_commit*() helper
...
Callers will be ported to TestWorkDir API separately.
2025-03-11 01:23:13 +00:00
Jo Liss
4e3f43c261
docs: explain that jj root
is synonymous with jj workspace root
2025-03-10 21:44:06 +00:00
Emily
b2d63189b9
git: use try_collect
2025-03-10 21:22:42 +00:00
dependabot[bot]
9a15ce5fbd
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 [EmbarkStudios/cargo-deny-action](https://github.com/embarkstudios/cargo-deny-action ).
Updates `taiki-e/install-action` from 2.49.16 to 2.49.19
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](1426bdb9e2...87b5304d4e
)
Updates `EmbarkStudios/cargo-deny-action` from 2.0.10 to 2.0.11
- [Release notes](https://github.com/embarkstudios/cargo-deny-action/releases )
- [Commits](4de59db63a...34899fc7ba
)
---
updated-dependencies:
- dependency-name: taiki-e/install-action
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
- dependency-name: EmbarkStudios/cargo-deny-action
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 17:34:36 +00:00
dependabot[bot]
517d647091
cargo: bump the cargo-dependencies group with 3 updates
...
Bumps the cargo-dependencies group with 3 updates: [rustix](https://github.com/bytecodealliance/rustix ), [serde](https://github.com/serde-rs/serde ) and [syn](https://github.com/dtolnay/syn ).
Updates `rustix` from 0.38.44 to 1.0.1
- [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/v0.38.44...v1.0.1 )
Updates `serde` from 1.0.218 to 1.0.219
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.218...v1.0.219 )
Updates `syn` from 2.0.99 to 2.0.100
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.99...2.0.100 )
---
updated-dependencies:
- dependency-name: rustix
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: cargo-dependencies
- dependency-name: serde
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-03-10 17:33:43 +00:00
demize
c3cc3de818
git: clean up remove_remote_git_config_sections
2025-03-10 15:08:38 +00:00
demize
cf696ce1b6
git: update gitoxide
repository options
...
This fixes tests in --release and provides safer
defaults.
2025-03-10 15:08:38 +00:00
Emily
eeb34146ca
tests: remove libgit2
test performance hack
...
I think we should only initialize the library for the fetch/push
tests now, so it should be okay to drop this.
2025-03-10 15:08:08 +00:00
Emily
ad35f865ed
git_backend: remove obsolete libgit2
workaround
2025-03-10 15:07:46 +00:00
Caleb White
072af8448f
cli: bookmark move: allow short aliases for --to
/--from
...
If `--to` is going to become a required argument, it should
have a short alias as it will be used quite frequently.
Given that `--to` has a short alias it only makes sense to
allow `-f` for `--from` as this is consistent with other
commands and nothing makes this particular command special.
2025-03-10 13:02:08 +00:00
Yuya Nishihara
16028245d6
tests: add workspace test helper, use it in test_global_opts.rs
...
It's super common to pair test_env with repo_path.
Some of the tests still use absolute paths because it seemed rather confusing
to mix paths relative to the repo_root and to the env_root.
2025-03-10 07:50:18 +00:00
Martin von Zweigbergk
5f8654ef68
revset: remove unused lifetime parameter from RevsetIteratorExt
...
It became unused in 75605e36.
2025-03-10 07:49:59 +00:00
Yuya Nishihara
c0066083ad
git: make import of refs/remotes/git/* non-error, warn failed refs instead
...
I'm going to reimplement git_ref_filter to process translated remote bookmark
names, and "git" remote will mean the local Git-tracking remote there. The
reserved remote name is checked prior to filtering because refs in that remote
cannot be represented as remote symbols.
I originally implemented the error handling the other way because we didn't
have a machinery to report partial import failure. Now we have stats, it's
easy to report skipped ref names.
2025-03-10 02:04:33 +00:00
Yuya Nishihara
cc1b716d39
git: plumbing to report unimportable refs, warn non-utf-8 names
...
Tests will be added by the next patch. It's not important to report non-utf-8
refs, but this patch implements it as doing that was easy.
2025-03-10 02:04:33 +00:00
Emily
fd7f1f558e
cli: remove git_util::get_git_repo
...
No longer used by anything.
2025-03-09 21:17:10 +00:00
Emily
2e0bdd3396
cli: use gix
in maybe_set_repository_level_trunk_alias
2025-03-09 21:17:10 +00:00
Emily
8297938feb
git: port remote management to gix
2025-03-09 21:17:10 +00:00
Emily
09f6cafa2b
git: add remote management tests
2025-03-09 21:17:10 +00:00
Emily
c25aa6e417
git: abstract git2
in remote management API
...
This is more consistent with other similar APIs and minimizes churn
in the test code as we move these to `gix`.
2025-03-09 21:17:10 +00:00
Yuya Nishihara
3318d172ff
cli: bookmark: scan deleted local bookmarks in separate loop
...
We no longer have to do multiple things in one loop.
2025-03-09 09:33:07 +00:00
Yuya Nishihara
791e04954e
cli: bookmark: collect all list items to temporary vec
...
I think this will help implement sorting options. Untracked remote bookmarks
should be sorted independently, whereas tracked remote bookmarks should always
be listed after the associated local bookmarks.
2025-03-09 09:33:07 +00:00
Yuya Nishihara
cdcaee62f1
templater: add public getter methods to RefName type
...
Some of these will be called from "jj bookmark list". The template RefName type
is useful as an abstract local/remote ref object. Maybe it should be renamed to
RefEntry or CommitRef.
2025-03-09 09:33:07 +00:00
Martin von Zweigbergk
0055cd4e0b
cli tests: move create_commit()
tests helpers to common/
2025-03-09 00:44:25 +00:00
Martin von Zweigbergk
169c131902
test_git_fetch: move clarification of description to template
...
I'm about to move the `create_commit()` helper to a common
place. However, this version of `create_commit()` is different from
the others in that it put a prefix of "descr_for_" in the
description. This patch removes that and instead updates the template
so it's still clear what's a description and what's a bookmark name.
2025-03-09 00:44:25 +00:00
Caleb White
813d2f1e6d
config: update diff-editor and merge-editor schema
...
The docs show that the diff-editor, and merge-editor settings
can be a string or an array of strings. This updates the config
schema to reflect that.
2025-03-09 00:16:04 +00:00
Martin von Zweigbergk
95aac580b0
rewrite: fix a Clippy lint
2025-03-08 20:45:39 +00:00
Emily
596738a303
cargo: bump git2 to 0.20.0
2025-03-08 16:50:58 +00:00
Benjamin Tan
c248d97679
cli: debug copy-detection: fix help text
...
It looks like the help text was copied from another command and not
updated.
2025-03-08 15:28:55 +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
Ilya Grigoriev
7b38f82b3f
cli op log
: short -d
alias for --op-diff
...
`--op-diff` is often more useful than `-p`/`--patch`.
2025-03-08 06:49:34 +00:00
Yuya Nishihara
697cd504ff
cli: pass clap::Error to map_clap_cli_error()
2025-03-08 04:33:09 +00:00
Yuya Nishihara
9bf2e9b20d
cli: move tracing configuration out of parse_args()
...
This helps simplify the error type. It's also weird that the parsing function
sets up tracing subscription.
2025-03-08 04:33:09 +00:00
dependabot[bot]
3df26f2d70
github: bump the github-dependencies group across 1 directory with 2 updates
...
Bumps the github-dependencies group with 2 updates in the / directory: [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.49.15 to 2.49.16
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](955a6ff141...1426bdb9e2
)
Updates `github/codeql-action` from 3.28.10 to 3.28.11
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](b56ba49b26...6bb031afdd
)
---
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-03-08 02:12:22 +00:00
dependabot[bot]
1f38488b07
cargo: bump the cargo-dependencies group across 1 directory with 2 updates
...
Bumps the cargo-dependencies group with 2 updates in the / directory: [tempfile](https://github.com/Stebalien/tempfile ) and [tokio](https://github.com/tokio-rs/tokio ).
Updates `tempfile` from 3.17.1 to 3.18.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.17.1...v3.18.0 )
Updates `tokio` from 1.43.0 to 1.44.0
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.43.0...tokio-1.44.0 )
---
updated-dependencies:
- dependency-name: tempfile
dependency-type: direct:production
update-type: version-update:semver-minor
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-03-08 01:53:32 +00:00
Yuya Nishihara
a27d925565
cleanup: switch to use<'_> capturing syntax
...
This patch fixes `'a: 'b, 'a` lifetime constraints, adds use<>, use<'_>, etc.
where the default would differ between editions. Redundant '_ is also removed.
https://doc.rust-lang.org/stable/edition-guide/rust-2024/rpit-lifetime-capture.html#edition-specific-rules-when-no-use-bound-is-present
2025-03-08 01:16:56 +00:00
Yuya Nishihara
b255dbed0a
cleanup: remove unneeded lifetime capturing from snapshot_progress()
...
ui.progress_output() doesn't borrow anything from &Ui, and there would be no
reason to extend the borrow. Write ops on Ui don't require mutable instance.
2025-03-08 01:16:56 +00:00
Yuya Nishihara
df3c15a030
revset: remove support for multiple files() arguments
...
Since there are no revset functions that require at least N arguments, the
error message test is moved to test_templater.rs.
2025-03-08 00:54:28 +00:00
Yuya Nishihara
d9615800ec
revset: replace use of deprecated file() alias in tests
2025-03-08 00:54:28 +00:00
Yuya Nishihara
bf54158fa2
revset: remove deprecated singular aliases
2025-03-08 00:54:28 +00:00
Yuya Nishihara
54868877d6
revset, templater: remove deprecated "branches" aliases
2025-03-08 00:54:28 +00:00
Evan Mesterhazy
0edf23eb16
lib rewrite: Add a test for CommitWithSelection
...
This is in preparation for adding a new function that inverts the selection.
2025-03-08 00:11:29 +00:00
Evan Mesterhazy
29e2ccf4ae
cargo-deny: Ignore paste crate deprecation
...
The paste crate hasn't had a maintainer since Oct. 2024. We don't use it
directly, but it's used by ratatui, and there's no direct replacement for it
AFAIK.
Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0436
This is currently blocking PRs because ci fails:
```
error[unmaintained]: paste - no longer maintained
┌─ /github/workspace/Cargo.lock:262:1
│
262 │ paste 1.0.15 registry+https://github.com/rust-lang/crates.io-index
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ unmaintained advisory detected
│
├ ID: RUSTSEC-2024-0436
├ Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0436
├ The creator of the crate `paste` has stated in the [`README.md`](https://github.com/dtolnay/paste/blob/master/README.md )
that this project is not longer maintained as well as archived the repository
├ Announcement: https://github.com/dtolnay/paste
├ Solution: No safe upgrade is available!
├ paste v1.0.15
└── ratatui v0.29.0
└── scm-record v0.5.0
└── jj-cli v0.27.0
└── (dev) jj-cli v0.27.0 (*)
advisories FAILED
```
2025-03-07 19:21:36 +00:00
George Christou
ad39c97d04
cli: remove untrack
subcommand
2025-03-07 11:00:08 +00:00
Yuya Nishihara
dfb10cab9b
git: reject reserved remote name early in fetch() function
...
I'm going to make git::import_refs() not fail because of a real remote named
"git", but fetching from such remote should be an error.
2025-03-07 03:03:45 +00:00
Yuya Nishihara
b2fd1a002e
git: extract helper to check unsupported remote name
2025-03-07 03:03:45 +00:00
Yuya Nishihara
99bc2d2f7d
git: consolidate when to check unsupported remote name on push
...
It's odd that "foo/bar" is tested earlier in push_branches() whereas "git" is
rejected by push_updates(). Suppose push_updates() is a low-level function to
push arbitrary refs without updating jj's repo view, it's probably okay to allow
unsupported remote name here.
2025-03-07 03:03:45 +00:00
George Christou
5eb3c5b658
cli: remove unsquash
subcommand
2025-03-07 01:46:19 +00:00