Skip to content

Commit

Permalink
Merge pull request #246 from o2sh/hotfix/fix-number-of-branches
Browse files Browse the repository at this point in the history
fix number of branches to ignore HEAD
  • Loading branch information
o2sh authored Oct 9, 2020
2 parents ec8a9e4 + fa63290 commit e334176
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,11 @@ impl Info {

let branches = String::from_utf8_lossy(&output.stdout);

branches.lines().count()
if branches.lines().count() > 0 {
branches.lines().count() - 1 //Exclude origin/HEAD -> origin/master
} else {
0
}
};

futures::join!(tags, branches)
Expand Down

0 comments on commit e334176

Please sign in to comment.