forked from mirrors/jj
cli: remove weird line break from the "jj branch forget" hint
The message seems a bit too long, but it doesn't make sense to insert \n in the middle of sentence.
This commit is contained in:
parent
4d91e4c196
commit
40d18bb2c9
5 changed files with 16 additions and 30 deletions
|
@ -706,8 +706,8 @@ fn cmd_branch_list(
|
|||
if found_non_git_remote {
|
||||
writeln!(
|
||||
formatter,
|
||||
" (this branch will be *deleted permanently* on the remote on the\n next \
|
||||
`jj git push`. Use `jj branch forget` to prevent this)"
|
||||
" (this branch will be *deleted permanently* on the remote on the next `jj \
|
||||
git push`. Use `jj branch forget` to prevent this)"
|
||||
)?;
|
||||
} else {
|
||||
writeln!(
|
||||
|
|
|
@ -333,16 +333,13 @@ fn test_branch_delete_glob() {
|
|||
@origin: qpvuntsm 6fbf398c (empty) commit
|
||||
foo-1 (deleted)
|
||||
@origin: qpvuntsm 6fbf398c (empty) commit
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
foo-3 (deleted)
|
||||
@origin: qpvuntsm 6fbf398c (empty) commit
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
foo-4 (deleted)
|
||||
@origin: qpvuntsm 6fbf398c (empty) commit
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
"###);
|
||||
|
||||
// Malformed glob
|
||||
|
@ -583,8 +580,7 @@ fn test_branch_forget_deleted_or_nonexistent_branch() {
|
|||
insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
|
||||
feature1 (deleted)
|
||||
@origin: mzyxwzks 9f01a0e0 message
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
"###);
|
||||
|
||||
// ============ End of test setup ============
|
||||
|
@ -947,8 +943,7 @@ fn test_branch_list() {
|
|||
local-only: wqnwkozp 4e887f78 (empty) local-only
|
||||
remote-delete (deleted)
|
||||
@origin: mnmymoky 203e60eb (empty) remote-delete
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
remote-sync: zwtyzrop c761c7ea (empty) remote-sync
|
||||
remote-unsync: wqnwkozp 4e887f78 (empty) local-only
|
||||
@origin (ahead by 1 commits, behind by 1 commits): qpsqxpyq 38ef8af7 (empty) remote-unsync
|
||||
|
@ -959,8 +954,7 @@ fn test_branch_list() {
|
|||
local-only: wqnwkozp 4e887f78 (empty) local-only
|
||||
remote-delete (deleted)
|
||||
@origin: mnmymoky 203e60eb (empty) remote-delete
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
remote-sync: zwtyzrop c761c7ea (empty) remote-sync
|
||||
@origin: zwtyzrop c761c7ea (empty) remote-sync
|
||||
remote-unsync: wqnwkozp 4e887f78 (empty) local-only
|
||||
|
@ -1023,8 +1017,7 @@ fn test_branch_list_filtered() {
|
|||
local-keep: kpqxywon c7b4c09c (empty) local-keep
|
||||
remote-delete (deleted)
|
||||
@origin: yxusvupt dad5f298 (empty) remote-delete
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
remote-keep: nlwprzpn 911e9120 (empty) remote-keep
|
||||
remote-rewrite: xyxluytn e31634b6 (empty) rewritten
|
||||
@origin (ahead by 1 commits, behind by 1 commits): xyxluytn hidden 3e9a5af6 (empty) remote-rewrite
|
||||
|
@ -1067,8 +1060,7 @@ fn test_branch_list_filtered() {
|
|||
insta::assert_snapshot!(query(&["remote-delete"]), @r###"
|
||||
remote-delete (deleted)
|
||||
@origin: yxusvupt dad5f298 (empty) remote-delete
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
"###);
|
||||
insta::assert_snapshot!(query(&["-rbranches(remote-delete)"]), @r###"
|
||||
"###);
|
||||
|
@ -1082,8 +1074,7 @@ fn test_branch_list_filtered() {
|
|||
local-keep: kpqxywon c7b4c09c (empty) local-keep
|
||||
remote-delete (deleted)
|
||||
@origin: yxusvupt dad5f298 (empty) remote-delete
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
remote-keep: nlwprzpn 911e9120 (empty) remote-keep
|
||||
"###);
|
||||
|
||||
|
|
|
@ -876,8 +876,7 @@ fn test_fetch_undo_what() {
|
|||
insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
|
||||
b (deleted)
|
||||
@origin: vpupmnsl hidden c7d4bdcb descr_for_b
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
"###);
|
||||
|
||||
// Now, let's demo restoring just the remote-tracking branch. First, let's
|
||||
|
@ -886,8 +885,7 @@ fn test_fetch_undo_what() {
|
|||
insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
|
||||
b (deleted)
|
||||
@origin: vpupmnsl hidden c7d4bdcb descr_for_b
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
newbranch: qpvuntsm 230dd059 (empty) (no description set)
|
||||
"###);
|
||||
// Restoring just the remote-tracking state will not affect `newbranch`, but
|
||||
|
|
|
@ -280,8 +280,7 @@ fn test_git_push_multiple() {
|
|||
insta::assert_snapshot!(stdout, @r###"
|
||||
branch1 (deleted)
|
||||
@origin: lzmmnrxq 45a3aa29 (empty) description 1
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
branch2: yqosqzyt 15dcdaa4 (empty) foo
|
||||
@origin (ahead by 1 commits, behind by 1 commits): rlzusymt 8476341e (empty) description 2
|
||||
my-branch: yqosqzyt 15dcdaa4 (empty) foo
|
||||
|
|
|
@ -344,8 +344,7 @@ fn test_branch_track_untrack_undo() {
|
|||
@origin: qpvuntsm 270721f5 (empty) commit
|
||||
feature2 (deleted)
|
||||
@origin: qpvuntsm 270721f5 (empty) commit
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
"###);
|
||||
|
||||
// Track/untrack can be undone so long as states can be trivially merged.
|
||||
|
@ -365,8 +364,7 @@ fn test_branch_track_untrack_undo() {
|
|||
@origin: qpvuntsm 270721f5 (empty) commit
|
||||
feature2 (deleted)
|
||||
@origin: qpvuntsm 270721f5 (empty) commit
|
||||
(this branch will be *deleted permanently* on the remote on the
|
||||
next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
(this branch will be *deleted permanently* on the remote on the next `jj git push`. Use `jj branch forget` to prevent this)
|
||||
"###);
|
||||
|
||||
test_env.jj_cmd_ok(&repo_path, &["undo"]);
|
||||
|
|
Loading…
Reference in a new issue