Skip to content

Commit

Permalink
cli: report branches as missing, not deleted
Browse files Browse the repository at this point in the history
"Deleted" is inaccurate if the branch never existed to begin with.
  • Loading branch information
chooglen committed Dec 14, 2022
1 parent b237e3c commit 00c3f3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3593,7 +3593,7 @@ fn list_branches(
}
}
None => {
writeln!(formatter, " (deleted)")?;
writeln!(formatter, " (missing)")?;
}
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion tests/test_git_import_export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn test_git_import_remote_only_branch() {
test_env.jj_cmd_success(&repo_path, &["git", "fetch", "--remote=origin"]);
insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
feature1: 9f01a0e04879 message
feature2 (deleted)
feature2 (missing)
@origin: 9f01a0e04879 message
"###);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_git_push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn test_git_push_all() {
// Check the setup
let stdout = test_env.jj_cmd_success(&workspace_root, &["branch", "list"]);
insta::assert_snapshot!(stdout, @r###"
branch1 (deleted)
branch1 (missing)
@origin: 828a683493c6 description 1
branch2: afc3e612e744 foo
@origin (ahead by 1 commits, behind by 1 commits): 752dad8b1718 description 2
Expand Down

0 comments on commit 00c3f3a

Please sign in to comment.