Skip to content

Commit

Permalink
cli: bookmark: remove hint about upsert behavior
Browse files Browse the repository at this point in the history
It was added at 3c80e34 "cli: branch: make "set" do upsert as before" in
order to remind behavior change.
  • Loading branch information
yuja committed Feb 17, 2025
1 parent fa3254b commit 3cdaa5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
7 changes: 0 additions & 7 deletions cli/src/commands/bookmark/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,6 @@ pub fn cmd_bookmark_set(
if bookmark_names.len() > 1 && args.revision.is_none() {
writeln!(ui.hint_default(), "Use -r to specify the target revision.")?;
}
if new_bookmark_count > 0 {
// TODO: delete this hint in jj 0.25+
writeln!(
ui.hint_default(),
"Consider using `jj bookmark move` if your intention was to move existing bookmarks."
)?;
}

tx.finish(
ui,
Expand Down
11 changes: 4 additions & 7 deletions cli/tests/test_bookmark_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,10 @@ fn test_bookmark_multiple_names() {
// Create and move with explicit -r
let (_stdout, stderr) =
test_env.jj_cmd_ok(&repo_path, &["bookmark", "set", "-r@", "bar", "baz"]);
insta::assert_snapshot!(stderr, @r###"
insta::assert_snapshot!(stderr, @r"
Created 1 bookmarks pointing to zsuskuln 8bb159bc bar baz | (empty) (no description set)
Moved 1 bookmarks to zsuskuln 8bb159bc bar baz | (empty) (no description set)
Hint: Consider using `jj bookmark move` if your intention was to move existing bookmarks.
"###);
");

// Noop changes should not be included in the stats
let (_stdout, stderr) =
Expand Down Expand Up @@ -164,10 +163,9 @@ fn test_bookmark_move() {
"###);

let (_stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["bookmark", "set", "foo", "--to=@"]);
insta::assert_snapshot!(stderr, @r###"
insta::assert_snapshot!(stderr, @r"
Created 1 bookmarks pointing to qpvuntsm 230dd059 foo | (empty) (no description set)
Hint: Consider using `jj bookmark move` if your intention was to move existing bookmarks.
"###);
");

test_env.jj_cmd_ok(&repo_path, &["new"]);
let stderr = test_env.jj_cmd_failure(&repo_path, &["bookmark", "create", "-r@", "foo"]);
Expand Down Expand Up @@ -1925,7 +1923,6 @@ fn test_bookmark_set_with_default_target_revision() {
insta::assert_snapshot!(stderr, @r"
Warning: Target revision was not specified, defaulting to the working copy (--revision=@). In the near future it will be required to explicitly specify target revision.
Created 1 bookmarks pointing to qpvuntsm 230dd059 foo | (empty) (no description set)
Hint: Consider using `jj bookmark move` if your intention was to move existing bookmarks.
");
}

Expand Down

0 comments on commit 3cdaa5b

Please sign in to comment.