From 11103c19ce35e559ac068593515fa54399948a7b Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 15 Sep 2018 02:27:19 +0700 Subject: package_git: call continue if branch name match with "master" While at it, update the comment to reflect the code below. --- package_git.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package_git.go b/package_git.go index 6247916..10b7052 100644 --- a/package_git.go +++ b/package_git.go @@ -104,12 +104,14 @@ func (pkg *Package) gitGetBranch() (err error) { return } - // Select branch by version, master, or the last branch. + // Select branch by name "master", or by version, or the last branch + // if no match. midx := -1 vidx := -1 for x := 0; x < len(branches); x++ { if branches[x] == gitDefBranch { midx = x + continue } if branches[x][0] == 'v' { if vidx < 0 { -- cgit v1.3