Skip to content

Commit b546900

Browse files
author
Stephan Dilly
authored
Fix 623 head remote (#631)
1 parent 7bc3ee1 commit b546900

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/branchlist.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,13 @@ impl BranchListComponent {
273273
/// fetch list of branches
274274
pub fn update_branches(&mut self) -> Result<()> {
275275
self.branches = get_branches_info(CWD, self.local)?;
276+
//remove remote branch called `HEAD`
277+
if !self.local {
278+
self.branches
279+
.iter()
280+
.position(|b| b.name.ends_with("/HEAD"))
281+
.map(|idx| self.branches.remove(idx));
282+
}
276283
self.set_selection(self.selection)?;
277284
Ok(())
278285
}

0 commit comments

Comments
 (0)