Yuya Nishihara
83d40d2c42
repo: move rebase_descendants_with_options_return_map() to tests
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-18 01:21:28 +00:00
Yuya Nishihara
15f4ac5f12
repo: add rebase_descendants_*() that takes callback instead of returning map
...
There's only one non-test caller who doesn't need a complete map of rebased
commits.
FWIW, I tried to rewrite squash_commits() based on transform_descendants() API,
but it wasn't easy because of A-B+A=A rule. The merge order matters here.
2025-01-18 01:21:28 +00:00
Yuya Nishihara
e3efb0d614
rewrite: pass RebaseOptions by reference
...
Since we've removed DescendantRebaser, it no longer makes sense to pass options
by value. This patch also replaces Default::default() for clarity.
2025-01-18 01:21:28 +00:00
dependabot[bot]
dbb9e7e9f9
github: bump the github-dependencies group with 2 updates
...
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 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.47.14 to 2.47.15
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](e26ea2a159...d125c0a835
)
Updates `astral-sh/setup-uv` from 5.2.0 to 5.2.1
- [Release notes](https://github.com/astral-sh/setup-uv/releases )
- [Commits](4e3dbecc19...b5f58b2abc
)
---
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-01-17 17:37:24 +00:00
Vincent Ging Ho Yim
661c443dbc
docs/contributing: fix incorrect bookmark name
2025-01-17 12:23:24 +00:00
Vincent Ging Ho Yim
efb9be4e55
changelog: remove extraneous parentheses
2025-01-17 12:22:05 +00:00
Vincent Ging Ho Yim
a44ec17c9a
changelog: add missing comma
2025-01-17 12:22:05 +00:00
Yuya Nishihara
5d1f3d006d
repo: pass &Commit to record_abandoned_commit() to simplify error handling
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-17 00:28:25 +00:00
Yuya Nishihara
8833a7adc7
repo: propagate error from record_rewrites()
2025-01-17 00:28:25 +00:00
Yuya Nishihara
cb981c7bf1
git: propagate error from abandon_unreachable_commits()
2025-01-17 00:28:25 +00:00
dependabot[bot]
34447d7ecc
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.47.13 to 2.47.14
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](6ae49f1b8b...e26ea2a159
)
Updates `astral-sh/setup-uv` from 5.1.0 to 5.2.0
- [Release notes](https://github.com/astral-sh/setup-uv/releases )
- [Commits](887a942a15...4e3dbecc19
)
---
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-minor
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-01-16 17:33:22 +00:00
Yuya Nishihara
646bdabe62
absorb: print status if source commit still contains diffs
...
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
Closes #5362
2025-01-16 01:09:33 +00:00
Yuya Nishihara
e910ac4040
absorb: wrap absorb_hunks() result in struct
...
This patch also renames rewritten_commits as I'm going to add rewritten_source
field.
2025-01-16 01:09:33 +00:00
Yuya Nishihara
3711979a8f
absorb: show warning if source commit contains file deletion
2025-01-16 01:09:33 +00:00
Bryce Berger
f7431650be
templates: add cryptographic_signature display to default formats
...
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
Cryptographic signature support in templates was added in
c99c97c646
(#4853 ), but has to be manually
configured. This adds some defaults to the built-in config.
Instead of having separate `builtin_*_with_sig` aliases, this adds to
the aliases that actually format commits. Since signature verification
is slow, this is disabled by default. To enable it, override
`ui.show-cryptographic-signatures`:
[ui]
show-cryptographic-signatures = true
[template-aliases]
'format_short_cryptographic_signature(signature)' = ...
'format_detailed_cryptographic_signature(signature)' = ...
Note that the two formatting functions take
`Option<CryptographicSignature>`, not `CryptographicSignature`. This
allows you to display a custom message if a signature is not found, but
will emit an error if you do not check for signature presence.
[template-aliases]
'format_detailed_cryptographic_signature(signature)' = '''
if(signature,
"message if present",
"message if missing",
)
'''
2025-01-15 23:29:35 +00:00
dependabot[bot]
83add0f338
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.12 to 2.47.13
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](333ea3e9a4...6ae49f1b8b
)
---
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-15 18:48:37 +00:00
Charlie-83
ae8f6a3837
docs: fix incorrect XDG env variable
2025-01-15 18:06:02 +00:00
Yuya Nishihara
4dd554aa69
revset: parse unicode XID_CONTINUE characters as symbol
...
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
Tag and bookmark names are usually ASCII, but they occasionally include Latin
or Han characters.
This doesn't fix the serialization problem, but should mitigate #5359 .
2025-01-15 07:24:10 +00:00
Yuya Nishihara
284aee25a9
revset: duplicate Rule::identifier to strict_identifier, replace some usages
...
The "identifier" rule will be changed to accept unicode characters. It's not
super important to reject non-ASCII string pattern prefixes or alias symbols,
but this is more consistent with templater and fileset. We can relax the rule
later if needed.
2025-01-15 07:24:10 +00:00
Yuya Nishihara
0fbf2913ac
revset: extract identifier/at_op parsing tests to separate functions
...
I'm going to add some unicode characters there, and the current test function
is pretty big.
2025-01-15 07:24:10 +00:00
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