mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-10 05:44:29 +03:00
cli: hint about how to recover from failed export of branches
This commit is contained in:
parent
e6d21ed442
commit
2e725270e4
@ -907,6 +907,13 @@ pub fn print_failed_git_export(
|
||||
formatter.with_label("branch", |formatter| formatter.write_str(branch_name))?;
|
||||
formatter.write_str("\n")?;
|
||||
}
|
||||
drop(formatter);
|
||||
ui.write_hint(
|
||||
r#"Hint: Git doesn't allow a branch name that looks like a parent directory of
|
||||
another (e.g. `foo` and `foo/bar`). Try to rename the branches that failed to
|
||||
export or their "parent" branches.
|
||||
"#,
|
||||
)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -193,6 +193,9 @@ fn test_git_colocated_conflicting_git_refs() {
|
||||
insta::assert_snapshot!(get_stderr_string(&assert), @r###"
|
||||
Failed to export some branches:
|
||||
main/sub
|
||||
Hint: Git doesn't allow a branch name that looks like a parent directory of
|
||||
another (e.g. `foo` and `foo/bar`). Try to rename the branches that failed to
|
||||
export or their "parent" branches.
|
||||
"###);
|
||||
}
|
||||
|
||||
|
@ -32,5 +32,8 @@ fn test_git_export_conflicting_git_refs() {
|
||||
insta::assert_snapshot!(get_stderr_string(&assert), @r###"
|
||||
Failed to export some branches:
|
||||
main/sub
|
||||
Hint: Git doesn't allow a branch name that looks like a parent directory of
|
||||
another (e.g. `foo` and `foo/bar`). Try to rename the branches that failed to
|
||||
export or their "parent" branches.
|
||||
"###);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user