From c470c1f575eee8f8b3a7dc8a39297c32d6dc3abb Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Fri, 10 Aug 2018 21:38:51 +1000 Subject: [PATCH] keep asterisk at the checked out branch --- branch_list_builder.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/branch_list_builder.go b/branch_list_builder.go index fdd88c850..5393bea3e 100644 --- a/branch_list_builder.go +++ b/branch_list_builder.go @@ -78,7 +78,8 @@ func (b *branchListBuilder) build() []Branch { branches := make([]Branch, 0) head := b.obtainCurrentBranch() validBranches := b.obtainSafeBranches() - reflogBranches := uniqueByName(append(b.obtainReflogBranches(), head)) + reflogBranches := b.obtainReflogBranches() + reflogBranches = uniqueByName(append([]Branch{head}, reflogBranches...)) branches = b.appendNewBranches(branches, reflogBranches, validBranches, true) branches = b.appendNewBranches(branches, validBranches, branches, false)