Skip to content

Commit

Permalink
cli: branch: slightly update warning message about rename with tracke…
Browse files Browse the repository at this point in the history
…d remotes

We use "tracked remote branches" in the doc, and hints are usually capitalized.
  • Loading branch information
yuja committed Jun 23, 2024
1 parent 58a5cd2 commit 6f7b306
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cli/src/commands/branch/rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ pub fn cmd_branch_rename(
if has_tracked_remote_branches(view, old_branch) {
writeln!(
ui.warning_default(),
"Branch {old_branch} has tracking remote branches which were not renamed."
"Branch {old_branch} has tracked remote branches which were not renamed."
)?;
writeln!(
ui.hint_default(),
"to rename the branch on the remote, you can `jj git push --branch {old_branch}` \
"To rename the branch on the remote, you can `jj git push --branch {old_branch}` \
first (to delete it on the remote), and then `jj git push --branch {new_branch}`. \
`jj git push --all` would also be sufficient."
)?;
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/test_branch_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ fn test_branch_rename() {
let (_stdout, stderr) =
test_env.jj_cmd_ok(&repo_path, &["branch", "rename", "bremote", "bremote2"]);
insta::assert_snapshot!(stderr, @r###"
Warning: Branch bremote has tracking remote branches which were not renamed.
Hint: to rename the branch on the remote, you can `jj git push --branch bremote` first (to delete it on the remote), and then `jj git push --branch bremote2`. `jj git push --all` would also be sufficient.
Warning: Branch bremote has tracked remote branches which were not renamed.
Hint: To rename the branch on the remote, you can `jj git push --branch bremote` first (to delete it on the remote), and then `jj git push --branch bremote2`. `jj git push --all` would also be sufficient.
"###);
}

Expand Down

0 comments on commit 6f7b306

Please sign in to comment.