mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
Fix 623 head remote (#631)
This commit is contained in:
parent
7bc3ee1dd3
commit
b546900e8f
1 changed files with 7 additions and 0 deletions
|
|
@ -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 a new issue