aboutsummaryrefslogtreecommitdiff
path: root/package_git.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2018-09-15 02:27:19 +0700
committerShulhan <ms@kilabit.info>2018-09-15 02:27:19 +0700
commit11103c19ce35e559ac068593515fa54399948a7b (patch)
tree9813008928b38c38d2054b02925cdab52f28a40d /package_git.go
parent2574021d0d90966f54a436ebdb061905ba95ab50 (diff)
downloadbeku-11103c19ce35e559ac068593515fa54399948a7b.tar.xz
package_git: call continue if branch name match with "master"
While at it, update the comment to reflect the code below.
Diffstat (limited to 'package_git.go')
-rw-r--r--package_git.go4
1 files changed, 3 insertions, 1 deletions
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 {