WIP: Note about branch prefixes
This commit is contained in:
@@ -579,6 +579,12 @@ pub fn add_worktree(
|
|||||||
} else {
|
} else {
|
||||||
let remote_branch_name = match track_config.default_remote_prefix {
|
let remote_branch_name = match track_config.default_remote_prefix {
|
||||||
Some(prefix) => {
|
Some(prefix) => {
|
||||||
|
repo.set_config_push(GitPushDefaultSetting::Upstream)?;
|
||||||
|
|
||||||
|
if repo.remotes()?.len() > 1 {
|
||||||
|
println!("Warning: You are using branch prefixes together with multiple remotes. This will have a few unexpected effects. When pushing to your non-default remote, you will always have to add a refspec explicitly, like so: git push myremote master. See TODO DOCLINK for more details")
|
||||||
|
|
||||||
|
}
|
||||||
format!("{}{}{}", &prefix, BRANCH_NAMESPACE_SEPARATOR, &name)
|
format!("{}{}{}", &prefix, BRANCH_NAMESPACE_SEPARATOR, &name)
|
||||||
}
|
}
|
||||||
None => name.to_string(),
|
None => name.to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user