mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-22 11:03:25 +03:00
Fix 623 head remote (#631)
This commit is contained in:
parent
7bc3ee1dd3
commit
b546900e8f
@ -273,6 +273,13 @@ impl BranchListComponent {
|
||||
/// fetch list of branches
|
||||
pub fn update_branches(&mut self) -> Result<()> {
|
||||
self.branches = get_branches_info(CWD, self.local)?;
|
||||
//remove remote branch called `HEAD`
|
||||
if !self.local {
|
||||
self.branches
|
||||
.iter()
|
||||
.position(|b| b.name.ends_with("/HEAD"))
|
||||
.map(|idx| self.branches.remove(idx));
|
||||
}
|
||||
self.set_selection(self.selection)?;
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user