Martin von Zweigbergk
2e6a0f9e96
merged_tree: make resolve()
also simplify the result
...
This changes the documented behavior of `resolve()` since it was
previously documented to not change the arity unless all conflicts
were resolved.
I plan to use `resolve()` from `MergedTreeBuilder::write_tree()`.
2024-06-08 20:29:30 +09:00
Martin von Zweigbergk
776b2d981f
merged_tree: make resolve()
return a MergedTree
...
It seems like a method on `MergedTree` should return another
`MergedTree` when reasonable. I'm not sure why I made it return a
`Merge<Tree>` instead.
2024-06-08 20:29:30 +09:00
Martin von Zweigbergk
6ab9d7bdc7
merged_tree: make resolve()
on legacy tree an error
...
The current implementation of `resolve()` on legacy trees just
pretended any conflicts were regular files. It's better to error
out. The function is only used in tests so far.
2024-06-08 20:29:30 +09:00
Yuya Nishihara
660a917aaa
revset: remove deprecated "program" rule, rename "program_with_modifier"
2024-06-08 12:48:46 +09:00
Yuya Nishihara
eda7069aee
revset: represent program modifier as AST node
...
The goal is to remove special case from parsing functions and provide slightly
better error message. I don't know if we'd want to use "all:" in aliases, but
there are no strong reasons to disable it.
2024-06-08 12:48:46 +09:00
Yuya Nishihara
3c1f6d5b5d
revset: insert AST-level representation of program modifier
2024-06-08 12:48:46 +09:00
dependabot[bot]
c51591bb4d
cargo: bump the cargo-dependencies group with 3 updates
...
Bumps the cargo-dependencies group with 3 updates: [clap](https://github.com/clap-rs/clap ), [clap_complete](https://github.com/clap-rs/clap ) and [clap_complete_nushell](https://github.com/clap-rs/clap ).
Updates `clap` from 4.5.4 to 4.5.6
- [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.4...v4.5.6 )
Updates `clap_complete` from 4.5.2 to 4.5.4
- [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.2...clap_complete-v4.5.4 )
Updates `clap_complete_nushell` from 4.5.1 to 4.5.2
- [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_nushell-v4.5.1...clap_complete_nushell-v4.5.2 )
---
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: clap_complete_nushell
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-07 16:10:31 +00:00
Yuya Nishihara
d2efd89135
docs: clarify that revset parents and children can be empty
...
I just added "can be empty" since it seems obvious when it becomes empty if it
can be empty. AFAICT, the confusion in #3821 is whether or not "no parents"
falls back to root().
2024-06-07 11:27:37 +09:00
Yuya Nishihara
186f639dfb
docs: sort list of operators in order of binding strengths
...
We can add a separate precedence/associativity table, but I think the ordered
list is good enough. Nullary :: and .. have no binding, but inserted after the
infix versions for brevity.
2024-06-07 11:27:37 +09:00
dploch
539edad216
diff_util: don't panic for file hashes < 10 hex chars
2024-06-06 11:50:59 -04:00
Martin von Zweigbergk
9fb5307b78
changelog: sort names in 0.18 release notes
2024-06-06 19:46:55 +09:00
Théo Daron
db8f655fe5
changelog: fix @tdaron username
2024-06-06 10:30:08 +02:00
mlcui
f2da2074cc
changelog: Fix @mlcui-corp username
...
I have renamed myself from @mlcui-google to @mlcui-corp, but the
changelog still had the old username.
(That username is now taken by a squatter...)
2024-06-06 14:11:14 +10:00
Austin Seipp
33ac9bca6c
release: version 0.18.0
2024-06-05 18:09:20 -05:00
Michael Gattozzi
3bc361a8b9
cli: add --allow-empty-description flag to push
...
This commit adds an optional flag to be able to push commits with an
empty description to a remote git repo. While the default behavior is
ideal we might need to interact with a repo that has an empty commit
description in it. I ran into this issue a few weeks ago pushing commits
from an open source repo to an empty repo and had to go back to using
git for that push as I would not want to rewrite the history which was
many many years long just for that.
This flag allows users an escape hatch for pushing empty descriptions
for commits and they're sure that they want that behavior.
This commit adds the flag to the `git push` command and updates the docs
for the command. It also updates the original test to make sure that the
flag works as intended to reject the commit when not set and to allow
the commit when the flag is set.
Closes #2633
2024-06-05 14:58:36 -04:00
Benjamin Tan
a3c6a9b1b7
new: allow --insert-before
and --insert-after
simultaneously
2024-06-05 19:29:27 +08:00
Benjamin Tan
bbadc6f14f
new: extract out ensure_no_commit_loop
function
2024-06-05 19:29:27 +08:00
Benjamin Tan
256a51f835
new: convert --insert-before
and --insert-after
into proper options
2024-06-05 19:29:27 +08:00
Benjamin Tan
f74618f41d
new: refactor creation of new commit into common code path
2024-06-05 19:29:27 +08:00
Benjamin Tan
a45a505b66
new: avoid manual unwrap()
call
2024-06-05 19:29:27 +08:00
dependabot[bot]
ccf25a5d56
cargo: bump unicode-width in the cargo-dependencies group
...
Bumps the cargo-dependencies group with 1 update: [unicode-width](https://github.com/unicode-rs/unicode-width ).
Updates `unicode-width` from 0.1.12 to 0.1.13
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.12...v0.1.13 )
---
updated-dependencies:
- dependency-name: unicode-width
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 10:41:30 +09:00
dependabot[bot]
9635f0a846
github: bump the github-dependencies group with 3 updates
...
Bumps the github-dependencies group with 3 updates: [DeterminateSystems/nix-installer-action](https://github.com/determinatesystems/nix-installer-action ), [DeterminateSystems/magic-nix-cache-action](https://github.com/determinatesystems/magic-nix-cache-action ) and [github/codeql-action](https://github.com/github/codeql-action ).
Updates `DeterminateSystems/nix-installer-action` from 11 to 12
- [Release notes](https://github.com/determinatesystems/nix-installer-action/releases )
- [Commits](8cdf194da9...7993355175
)
Updates `DeterminateSystems/magic-nix-cache-action` from 6 to 7
- [Release notes](https://github.com/determinatesystems/magic-nix-cache-action/releases )
- [Commits](87e8236f46...b46e247b89
)
Updates `github/codeql-action` from 3.25.7 to 3.25.8
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](f079b84933...2e230e8fe0
)
---
updated-dependencies:
- dependency-name: DeterminateSystems/nix-installer-action
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-dependencies
- dependency-name: DeterminateSystems/magic-nix-cache-action
dependency-type: direct:production
update-type: version-update:semver-major
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>
2024-06-05 10:41:03 +09:00
Yuya Nishihara
8745c01f98
revset: rename parse_expression_rule() to lower_expression()
...
As I said, revset has another symbol resolution stage. That's why this function
isn't called resolve_expression().
2024-06-05 10:39:32 +09:00
Yuya Nishihara
9f33d13dfd
revset: replace ParseState with &RevsetParseContext
...
There's no longer a mutable state to be tracked.
2024-06-05 10:39:32 +09:00
Yuya Nishihara
cbffa17bf0
revset: move primitive typed expression helpers to parser module
2024-06-05 10:39:32 +09:00
Yuya Nishihara
e383d41d22
revset: rename typed expression helpers
...
This is the naming convention we use in templater. These helper functions no
longer requires the passed node is a function argument.
2024-06-05 10:39:32 +09:00
Yuya Nishihara
b281bcd5cb
revset: inline invalid_arguments() constructor
...
There are only two callers, and this change might help if we want to extract
parse_function_call_node() to dsl_util.
2024-06-05 10:39:32 +09:00
Yuya Nishihara
14421ac126
revset: omit function name from type error messages
...
This simplifies the interface of helper functions. While revset doesn't have
top-level string pattern or integer literal, these parsing helpers could be
used to parse array subscript or n-th parent operator if any.
2024-06-05 10:39:32 +09:00
Yuya Nishihara
e9db051b84
cli: git: split loop that collects push directions and new targets
...
Just a minor code cleanup.
2024-06-05 10:39:17 +09:00
Danny Hooper
3050685ff3
cli: implement enough of jj fix
to run a single tool on all files
2024-06-04 14:28:21 -05:00
Danny Hooper
bbd9ba31df
lib: move command variable interpolation from merge tools to generic location
2024-06-04 14:28:21 -05:00
Danny Hooper
1ece76d128
cli: add a fake code formatter tool for testing
2024-06-04 14:28:21 -05:00
Martin von Zweigbergk
650eeb8935
cli: add jj fix
proof of concept
2024-06-04 14:28:21 -05:00
Yuya Nishihara
fcc0b86f0a
docs: fix another missing shell quoting around root()
...
We've turned the "root" symbol into a function before. That's probably why.
2024-06-04 21:19:16 +09:00
Matthew Davidson
88cb56d3dd
docs: Fix zsh-breaking logging example
2024-06-04 20:44:11 +09:00
Yuya Nishihara
3a4258916c
revset: inline parse_function_call_args()
...
The separate function looked rather verbose.
2024-06-04 09:56:21 +09:00
Yuya Nishihara
8a4abee87d
revset: insert named "function" rules
...
This patch copies function rule processing from templater and fileset. Since
function and identifier rules are quite different, it's better to not rely on
the subtle difference between identifier and function_name tokens.
2024-06-04 09:56:21 +09:00
Yuya Nishihara
127e4d3455
revset: flatten symbol rule
...
This makes it clear that the identifier node is special. For the other
constructs, we don't distinguish between bare symbol and quoted string.
2024-06-04 09:56:21 +09:00
Yuya Nishihara
674d897352
revset: inline trivial parsing functions to eliminate obvious assertions
2024-06-04 09:56:21 +09:00
Ilya Grigoriev
441175f2f9
jj help git
: Include "Git remotes" in the title
...
Previously, it sounded like `jj git` might only include highly-technical
commands, while IMO the most important commands in here are `jj git
fetch` and `jj git push`.
2024-06-03 09:36:06 -07:00
dependabot[bot]
0f12582818
cargo: bump proc-macro2 in the cargo-dependencies group
...
Bumps the cargo-dependencies group with 1 update: [proc-macro2](https://github.com/dtolnay/proc-macro2 ).
Updates `proc-macro2` from 1.0.84 to 1.0.85
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.84...1.0.85 )
---
updated-dependencies:
- dependency-name: proc-macro2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-03 11:27:12 -05:00
Ilya Grigoriev
b1e5ca5348
cli git push
: clearer user-facing messages
...
"Move forward" instead of "Move", "Move sideways" or "Move backward"
instead of (now misleading) "Force...".
2024-06-01 18:42:12 -07:00
Ilya Grigoriev
21b9453d59
jj help
: note that move
, checkout
, and merge
as deprecated
2024-06-01 18:38:23 -07:00
Ilya Grigoriev
ab195339b4
docs and jj help
: hide deprecated jj move
...
Fixes #3807
2024-06-01 18:38:23 -07:00
Yuya Nishihara
2c9132adfc
revset: remove RevsetExpression::StringPattern hack
...
It's no longer needed since we have proper AST tree now.
2024-06-02 10:28:54 +09:00
Yuya Nishihara
89ac3a1851
revset: split AST-level parsing and expression lowering stages
...
This will allows us to parse "file(..)" arguments as fileset expression by
transforming AST for example. I'm not sure if that's good or bad, but we'll
probably want to embed fileset expressions without quoting.
parse_expression_rule() is split to the first str->ExpressionNode stage and
the second ExpressionNode->RevsetExpression stage. The latter is called
"resolve_*()" in fileset, but we have another "symbol" resolution stage in
revset. So I choose "lower_*()" instead.
2024-06-02 10:28:54 +09:00
Yuya Nishihara
444e88e3b8
revset: backport AST types and helpers from templater and fileset
...
These types and helper functions will be enabled by the next patch.
2024-06-02 10:28:54 +09:00
Yuya Nishihara
2ea173185d
revset: add expect_exact_arguments() helper, replace expect_one_argument()
...
Prepares for migration to dsl_util::FunctionCallNode.
2024-06-02 10:28:54 +09:00
Ilya Grigoriev
a30df323bd
jj git push
docs: document safety checks
...
As discussed in
https://discord.com/channels/968932220549103686/1226363798483636265/1226415448615288864
2024-06-01 11:19:48 -07:00
Yuya Nishihara
5e7cb3435e
git: unset unborn HEAD ref on export
...
Otherwise, newly created default branch would be re-imported as a new Git HEAD.
This could be addressed by cmd_git_init(), but the same situation can be
crafted by using "git checkout -b".
2024-06-01 11:01:16 +09:00