mirror of
https://github.com/martinvonz/jj.git
synced 2024-10-04 01:17:54 +03:00
Compare commits
7 Commits
008a26e42c
...
0c934f463d
Author | SHA1 | Date | |
---|---|---|---|
|
0c934f463d | ||
|
2f9561a4b8 | ||
|
acdc42fd9f | ||
|
67c2ae0a9e | ||
|
d1b2e7ea82 | ||
|
72c5bbb4e6 | ||
|
8c11a8ea3e |
2
.github/workflows/codespell.yml
vendored
2
.github/workflows/codespell.yml
vendored
@ -19,4 +19,4 @@ jobs:
|
||||
check_filenames: true
|
||||
check_hidden: true
|
||||
skip: ./target,./.jj,*.lock
|
||||
ignore_words_list: crate,NotIn
|
||||
ignore_words_list: crate,NotIn,Wirth
|
||||
|
47
CHANGELOG.md
47
CHANGELOG.md
@ -11,7 +11,19 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
### Breaking changes
|
||||
|
||||
* Fixing #4239 means the ordering of some messages have changed.
|
||||
### Deprecations
|
||||
|
||||
### New features
|
||||
|
||||
### Fixed bugs
|
||||
|
||||
|
||||
## [0.22.0] - 2024-10-02
|
||||
|
||||
### Breaking changes
|
||||
|
||||
* Fixing [#4239](https://github.com/martinvonz/jj/issues/4239) means the
|
||||
ordering of some messages have changed.
|
||||
|
||||
* Invalid `ui.graph.style` configuration is now an error.
|
||||
|
||||
@ -20,9 +32,6 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
### Deprecations
|
||||
|
||||
* `jj obslog` is now called `jj evolution-log`/`jj evolog`. `jj obslog` remains
|
||||
as an alias.
|
||||
|
||||
* `jj branch` has been deprecated in favor of `jj bookmark`.
|
||||
|
||||
**Rationale:** Jujutsu's branches don't behave like Git branches, which a
|
||||
@ -31,6 +40,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
that describes them better, and they also behave similar to Mercurial's
|
||||
bookmarks.
|
||||
|
||||
* `jj obslog` is now called `jj evolution-log`/`jj evolog`. `jj obslog` remains
|
||||
as an alias.
|
||||
|
||||
* `jj unsquash` has been deprecated in favor of `jj squash` and
|
||||
`jj diffedit --restore-descendants`.
|
||||
|
||||
@ -95,7 +107,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
to keeping all changes into the first commit while keeping the current commit
|
||||
description for the second commit (the newly created empty one).
|
||||
|
||||
* Color author and committer names yellow
|
||||
* Author and committer names are now yellow by default.
|
||||
|
||||
* Without a specified revision, `jj new --insert-before` is now equivalent to
|
||||
`jj new --insert-before @`; same for `--insert-after`.
|
||||
|
||||
### Fixed bugs
|
||||
|
||||
@ -111,6 +126,28 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
`present(@)` evaluates to `none()` if the current workspace has no
|
||||
working-copy commit.
|
||||
|
||||
### Contributors
|
||||
|
||||
Thanks to the people who made this release happen!
|
||||
|
||||
* Austin Seipp (@thoughtpolice)
|
||||
* Danny Hooper (@hooper)
|
||||
* Emily Shaffer (@nasamuffin)
|
||||
* Essien Ita Essien (@essiene)
|
||||
* Ethan Brierley (@eopb)
|
||||
* Ilya Grigoriev (@ilyagr)
|
||||
* Kevin Liao (@kevincliao)
|
||||
* Lukas Wirth (@Veykril)
|
||||
* Martin von Zweigbergk (@martinvonz)
|
||||
* Mateusz Mikuła (@mati865)
|
||||
* mlcui (@mlcui-corp)
|
||||
* Philip Metzger (@PhilipMetzger)
|
||||
* Samuel Tardieu (@samueltardieu)
|
||||
* Stephen Jennings (@jennings)
|
||||
* Tyler Goffinet (@qubitz)
|
||||
* Vamsi Avula (@avamsi)
|
||||
* Yuya Nishihara (@yuja)
|
||||
|
||||
## [0.21.0] - 2024-09-04
|
||||
|
||||
### Breaking changes
|
||||
|
50
Cargo.lock
generated
50
Cargo.lock
generated
@ -357,9 +357,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.18"
|
||||
version = "4.5.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3"
|
||||
checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
@ -376,9 +376,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.18"
|
||||
version = "4.5.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b"
|
||||
checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
@ -389,9 +389,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap_complete"
|
||||
version = "4.5.29"
|
||||
version = "4.5.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8937760c3f4c60871870b8c3ee5f9b30771f792a7045c48bcbba999d7d6b3b8e"
|
||||
checksum = "bb31f1f3041ef3636e425b09e588911b72fc5513b2428b5b7df130f497e6a728"
|
||||
dependencies = [
|
||||
"clap",
|
||||
]
|
||||
@ -628,7 +628,7 @@ checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
"hashbrown",
|
||||
"hashbrown 0.14.5",
|
||||
"lock_api",
|
||||
"once_cell",
|
||||
"parking_lot_core",
|
||||
@ -890,7 +890,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gen-protos"
|
||||
version = "0.21.0"
|
||||
version = "0.22.0"
|
||||
dependencies = [
|
||||
"prost-build",
|
||||
]
|
||||
@ -1222,7 +1222,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ddf80e16f3c19ac06ce415a38b8591993d3f73aede049cb561becb5b3a8e242"
|
||||
dependencies = [
|
||||
"gix-hash",
|
||||
"hashbrown",
|
||||
"hashbrown 0.14.5",
|
||||
"parking_lot",
|
||||
]
|
||||
|
||||
@ -1258,7 +1258,7 @@ dependencies = [
|
||||
"gix-traverse",
|
||||
"gix-utils",
|
||||
"gix-validate",
|
||||
"hashbrown",
|
||||
"hashbrown 0.14.5",
|
||||
"itoa",
|
||||
"libc",
|
||||
"memmap2",
|
||||
@ -1607,6 +1607,12 @@ dependencies = [
|
||||
"allocator-api2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.5.0"
|
||||
@ -1696,17 +1702,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc9da1a252bd44cd341657203722352efc9bc0c847d06ea6d2dc1cd1135e0a01"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"hashbrown",
|
||||
"hashbrown 0.14.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.5.0"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5"
|
||||
checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown",
|
||||
"hashbrown 0.15.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1814,7 +1820,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "jj-cli"
|
||||
version = "0.21.0"
|
||||
version = "0.22.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"assert_cmd",
|
||||
@ -1871,7 +1877,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "jj-lib"
|
||||
version = "0.21.0"
|
||||
version = "0.22.0"
|
||||
dependencies = [
|
||||
"assert_matches",
|
||||
"async-trait",
|
||||
@ -1931,7 +1937,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "jj-lib-proc-macros"
|
||||
version = "0.21.0"
|
||||
version = "0.22.0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -2062,7 +2068,7 @@ version = "0.12.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904"
|
||||
dependencies = [
|
||||
"hashbrown",
|
||||
"hashbrown 0.14.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3050,12 +3056,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "terminal_size"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7"
|
||||
checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef"
|
||||
dependencies = [
|
||||
"rustix",
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3099,7 +3105,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "testutils"
|
||||
version = "0.21.0"
|
||||
version = "0.22.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"config",
|
||||
|
12
Cargo.toml
12
Cargo.toml
@ -5,7 +5,7 @@ resolver = "2"
|
||||
members = ["cli", "lib", "lib/gen-protos", "lib/proc-macros", "lib/testutils"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.21.0"
|
||||
version = "0.22.0"
|
||||
license = "Apache-2.0"
|
||||
rust-version = "1.76" # NOTE: remember to update CI, contributing.md, changelog.md, and flake.nix
|
||||
edition = "2021"
|
||||
@ -24,13 +24,13 @@ async-trait = "0.1.83"
|
||||
backoff = "0.4.0"
|
||||
blake2 = "0.10.6"
|
||||
bstr = "1.10.0"
|
||||
clap = { version = "4.5.18", features = [
|
||||
clap = { version = "4.5.19", features = [
|
||||
"derive",
|
||||
"deprecated",
|
||||
"wrap_help",
|
||||
"string",
|
||||
] }
|
||||
clap_complete = "4.5.29"
|
||||
clap_complete = "4.5.30"
|
||||
clap_complete_nushell = "4.5.3"
|
||||
clap-markdown = "0.1.4"
|
||||
clap_mangen = "0.2.10"
|
||||
@ -68,7 +68,7 @@ gix-filter = "0.13.0"
|
||||
glob = "0.3.1"
|
||||
hex = "0.4.3"
|
||||
ignore = "0.4.23"
|
||||
indexmap = "2.5.0"
|
||||
indexmap = "2.6.0"
|
||||
indoc = "2.0.4"
|
||||
insta = { version = "1.40.0", features = ["filters"] }
|
||||
itertools = "0.13.0"
|
||||
@ -128,8 +128,8 @@ zstd = "0.12.4"
|
||||
# put all inter-workspace libraries, i.e. those that use 'path = ...' here in
|
||||
# their own (alphabetically sorted) block
|
||||
|
||||
jj-lib = { path = "lib", version = "0.21.0" }
|
||||
jj-lib-proc-macros = { path = "lib/proc-macros", version = "0.21.0" }
|
||||
jj-lib = { path = "lib", version = "0.22.0" }
|
||||
jj-lib-proc-macros = { path = "lib/proc-macros", version = "0.22.0" }
|
||||
testutils = { path = "lib/testutils" }
|
||||
|
||||
# Insta suggests compiling these packages in opt mode for faster testing.
|
||||
|
@ -1771,13 +1771,31 @@ See https://martinvonz.github.io/jj/latest/working-copy/#stale-working-copy \
|
||||
self.report_repo_changes(ui, &old_repo)?;
|
||||
|
||||
let settings = self.settings();
|
||||
if settings.user_name().is_empty() || settings.user_email().is_empty() {
|
||||
let missing_user_name = settings.user_name().is_empty();
|
||||
let missing_user_mail = settings.user_email().is_empty();
|
||||
if missing_user_name || missing_user_mail {
|
||||
let mut writer = ui.warning_default();
|
||||
let not_configured_msg = match (missing_user_name, missing_user_mail) {
|
||||
(true, true) => "Name and email not configured.",
|
||||
(true, false) => "Name not configured.",
|
||||
(false, true) => "Email not configured.",
|
||||
_ => unreachable!(),
|
||||
};
|
||||
write!(writer, "{not_configured_msg} ")?;
|
||||
writeln!(
|
||||
ui.warning_default(),
|
||||
r#"Name and email not configured. Until configured, your commits will be created with the empty identity, and can't be pushed to remotes. To configure, run:
|
||||
jj config set --user user.name "Some One"
|
||||
jj config set --user user.email "someone@example.com""#
|
||||
writer,
|
||||
"Until configured, your commits will be created with the empty identity, and \
|
||||
can't be pushed to remotes. To configure, run:",
|
||||
)?;
|
||||
if missing_user_name {
|
||||
writeln!(writer, r#" jj config set --user user.name "Some One""#)?;
|
||||
}
|
||||
if missing_user_mail {
|
||||
writeln!(
|
||||
writer,
|
||||
r#" jj config set --user user.email "someone@example.com""#
|
||||
)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -63,20 +63,28 @@ pub(crate) struct NewArgs {
|
||||
/// No-op flag to pair with --no-edit
|
||||
#[arg(long, hide = true)]
|
||||
_edit: bool,
|
||||
/// Insert the new change after the given commit(s)
|
||||
/// Insert the new change after the given commit(s), or after `@` if no
|
||||
/// commit is specified
|
||||
#[arg(
|
||||
long,
|
||||
short = 'A',
|
||||
visible_alias = "after",
|
||||
conflicts_with = "revisions"
|
||||
conflicts_with = "revisions",
|
||||
default_missing_value = "@",
|
||||
// At most one argument per --after, does not restrict repeating --after
|
||||
num_args=0..=1,
|
||||
)]
|
||||
insert_after: Vec<RevisionArg>,
|
||||
/// Insert the new change before the given commit(s)
|
||||
/// Insert the new change before the given commit(s), or before `@` if no
|
||||
/// commit is specified
|
||||
#[arg(
|
||||
long,
|
||||
short = 'B',
|
||||
visible_alias = "before",
|
||||
conflicts_with = "revisions"
|
||||
conflicts_with = "revisions",
|
||||
default_missing_value = "@",
|
||||
// At most one argument per --before, does not restrict repeating --before
|
||||
num_args=0..=1,
|
||||
)]
|
||||
insert_before: Vec<RevisionArg>,
|
||||
}
|
||||
|
@ -1270,8 +1270,8 @@ For more information, see https://martinvonz.github.io/jj/latest/working-copy/.
|
||||
|
||||
* `-m`, `--message <MESSAGE>` — The change description to use
|
||||
* `--no-edit` — Do not edit the newly created change
|
||||
* `-A`, `--insert-after <INSERT_AFTER>` — Insert the new change after the given commit(s)
|
||||
* `-B`, `--insert-before <INSERT_BEFORE>` — Insert the new change before the given commit(s)
|
||||
* `-A`, `--insert-after <INSERT_AFTER>` — Insert the new change after the given commit(s), or after `@` if no commit is specified
|
||||
* `-B`, `--insert-before <INSERT_BEFORE>` — Insert the new change before the given commit(s), or before `@` if no commit is specified
|
||||
|
||||
|
||||
|
||||
|
@ -568,9 +568,8 @@ fn test_no_user_configured() {
|
||||
insta::assert_snapshot!(get_stderr_string(&assert), @r###"
|
||||
Working copy now at: qpvuntsm 7a7d6016 (empty) without name
|
||||
Parent commit : zzzzzzzz 00000000 (empty) (no description set)
|
||||
Warning: Name and email not configured. Until configured, your commits will be created with the empty identity, and can't be pushed to remotes. To configure, run:
|
||||
Warning: Name not configured. Until configured, your commits will be created with the empty identity, and can't be pushed to remotes. To configure, run:
|
||||
jj config set --user user.name "Some One"
|
||||
jj config set --user user.email "someone@example.com"
|
||||
"###);
|
||||
let assert = test_env
|
||||
.jj_cmd(&repo_path, &["describe", "-m", "without email"])
|
||||
@ -580,6 +579,18 @@ fn test_no_user_configured() {
|
||||
insta::assert_snapshot!(get_stderr_string(&assert), @r###"
|
||||
Working copy now at: qpvuntsm 906f8b89 (empty) without email
|
||||
Parent commit : zzzzzzzz 00000000 (empty) (no description set)
|
||||
Warning: Email not configured. Until configured, your commits will be created with the empty identity, and can't be pushed to remotes. To configure, run:
|
||||
jj config set --user user.email "someone@example.com"
|
||||
"###);
|
||||
let assert = test_env
|
||||
.jj_cmd(&repo_path, &["describe", "-m", "without name and email"])
|
||||
.env_remove("JJ_USER")
|
||||
.env_remove("JJ_EMAIL")
|
||||
.assert()
|
||||
.success();
|
||||
insta::assert_snapshot!(get_stderr_string(&assert), @r###"
|
||||
Working copy now at: qpvuntsm 57d3a489 (empty) without name and email
|
||||
Parent commit : zzzzzzzz 00000000 (empty) (no description set)
|
||||
Warning: Name and email not configured. Until configured, your commits will be created with the empty identity, and can't be pushed to remotes. To configure, run:
|
||||
jj config set --user user.name "Some One"
|
||||
jj config set --user user.email "someone@example.com"
|
||||
|
@ -224,13 +224,108 @@ fn test_new_insert_after() {
|
||||
|
||||
// --after cannot be used with revisions
|
||||
let stderr = test_env.jj_cmd_cli_error(&repo_path, &["new", "--after", "B", "D"]);
|
||||
insta::assert_snapshot!(stderr, @r###"
|
||||
error: the argument '--insert-after <INSERT_AFTER>' cannot be used with '[REVISIONS]...'
|
||||
insta::assert_snapshot!(stderr, @r#"
|
||||
error: the argument '--insert-after [<INSERT_AFTER>]' cannot be used with '[REVISIONS]...'
|
||||
|
||||
Usage: jj new --insert-after <INSERT_AFTER> [REVISIONS]...
|
||||
Usage: jj new --insert-after [<INSERT_AFTER>] [REVISIONS]...
|
||||
|
||||
For more information, try '--help'.
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_new_insert_before_after_no_arg() {
|
||||
let test_env = TestEnvironment::default();
|
||||
test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]);
|
||||
let repo_path = test_env.env_root().join("repo");
|
||||
setup_before_insertion(&test_env, &repo_path);
|
||||
test_env.jj_cmd_ok(&repo_path, &["edit", "-r", "B"]);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###"
|
||||
○ F
|
||||
├─╮
|
||||
│ ○ E
|
||||
○ │ D
|
||||
├─╯
|
||||
│ ○ C
|
||||
│ @ B
|
||||
│ ○ A
|
||||
├─╯
|
||||
◆ root
|
||||
"###);
|
||||
|
||||
let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["new", "--after", "-m", "G"]);
|
||||
insta::assert_snapshot!(stdout, @"");
|
||||
insta::assert_snapshot!(stderr, @r#"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: nkmrtpmo cf1ca757 (empty) G
|
||||
Parent commit : kkmpptxz bfd4157e B | (empty) B
|
||||
"#);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#"
|
||||
○ C
|
||||
@ G
|
||||
○ B
|
||||
○ A
|
||||
│ ○ F
|
||||
│ ├─╮
|
||||
│ │ ○ E
|
||||
├───╯
|
||||
│ ○ D
|
||||
├─╯
|
||||
◆ root
|
||||
"#);
|
||||
|
||||
let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["new", "-m", "H", "--before"]);
|
||||
insta::assert_snapshot!(stdout, @"");
|
||||
insta::assert_snapshot!(stderr, @r#"
|
||||
Rebased 2 descendant commits
|
||||
Working copy now at: xznxytkn f9f74f27 (empty) H
|
||||
Parent commit : kkmpptxz bfd4157e B | (empty) B
|
||||
"#);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#"
|
||||
○ C
|
||||
○ G
|
||||
@ H
|
||||
○ B
|
||||
○ A
|
||||
│ ○ F
|
||||
│ ├─╮
|
||||
│ │ ○ E
|
||||
├───╯
|
||||
│ ○ D
|
||||
├─╯
|
||||
◆ root
|
||||
"#);
|
||||
|
||||
let (stdout, stderr) = test_env.jj_cmd_ok(
|
||||
&repo_path,
|
||||
&["new", "-m", "I", "--after", "--after", "D", "--no-edit"],
|
||||
);
|
||||
insta::assert_snapshot!(stdout, @"");
|
||||
insta::assert_snapshot!(stderr, @r#"
|
||||
Created new commit nmzmmopx 56056dac (empty) I
|
||||
Rebased 3 descendant commits
|
||||
"#);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#"
|
||||
○ C
|
||||
○ G
|
||||
│ ○ F
|
||||
╭─┤
|
||||
○ │ I
|
||||
├───╮
|
||||
│ │ ○ D
|
||||
@ │ │ H
|
||||
○ │ │ B
|
||||
○ │ │ A
|
||||
├───╯
|
||||
│ ○ E
|
||||
├─╯
|
||||
◆ root
|
||||
"#);
|
||||
|
||||
let stderr = test_env.jj_cmd_failure(&repo_path, &["new", "--before", "--after"]);
|
||||
insta::assert_snapshot!(stderr, @r#"
|
||||
Error: Refusing to create a loop: commit f9f74f27408e would be both an ancestor and a descendant of the new commit
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -346,13 +441,13 @@ fn test_new_insert_before() {
|
||||
|
||||
// --before cannot be used with revisions
|
||||
let stderr = test_env.jj_cmd_cli_error(&repo_path, &["new", "--before", "B", "D"]);
|
||||
insta::assert_snapshot!(stderr, @r###"
|
||||
error: the argument '--insert-before <INSERT_BEFORE>' cannot be used with '[REVISIONS]...'
|
||||
insta::assert_snapshot!(stderr, @r#"
|
||||
error: the argument '--insert-before [<INSERT_BEFORE>]' cannot be used with '[REVISIONS]...'
|
||||
|
||||
Usage: jj new --insert-before <INSERT_BEFORE> [REVISIONS]...
|
||||
Usage: jj new --insert-before [<INSERT_BEFORE>] [REVISIONS]...
|
||||
|
||||
For more information, try '--help'.
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -78,6 +78,9 @@ only symbols.
|
||||
You can use parentheses to control evaluation order, such as `(x & y) | z` or
|
||||
`x & (y | z)`.
|
||||
|
||||
<!-- The following format will be understood by the web site generator, and will
|
||||
generate a folded section that can be unfolded at will. -->
|
||||
|
||||
??? examples
|
||||
|
||||
Given this history:
|
||||
|
Loading…
Reference in New Issue
Block a user