mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-01 12:26:02 +03:00
Fix origin/master showing in sidebar
This commit is contained in:
parent
93d019afce
commit
251424d567
@ -77,6 +77,14 @@ impl Refname {
|
||||
Refname::Other(raw) => raw.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remote(&self) -> Option<&str> {
|
||||
match self {
|
||||
Self::Remote(remote) => Some(remote.remote()),
|
||||
Self::Local(remote) => remote.remote().map(|remote| remote.remote()),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for Refname {
|
||||
|
@ -67,10 +67,8 @@ pub fn list_remote_branches(
|
||||
let branch = branch_to_remote_branch(&branch)?;
|
||||
|
||||
if let Some(branch) = branch {
|
||||
let upstream_remote = branch.upstream.as_ref().map(|u| u.remote());
|
||||
|
||||
let branch_is_trunk = branch.name.branch() == Some(default_target.branch.branch())
|
||||
&& upstream_remote == Some(default_target.branch.remote());
|
||||
&& branch.name.remote() == Some(default_target.branch.remote());
|
||||
|
||||
if !branch_is_trunk
|
||||
&& branch.name.branch() != Some("gitbutler/integration")
|
||||
|
Loading…
Reference in New Issue
Block a user