aboutsummaryrefslogtreecommitdiff
path: root/package_git.go
diff options
context:
space:
mode:
Diffstat (limited to 'package_git.go')
-rw-r--r--package_git.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/package_git.go b/package_git.go
index b094b1c..ba538fa 100644
--- a/package_git.go
+++ b/package_git.go
@@ -118,7 +118,7 @@ func (pkg *Package) gitGetBranch() (err error) {
pkg.RemoteBranch = branches[midx]
} else if vidx >= 0 {
pkg.RemoteBranch = branches[vidx]
- } else {
+ } else if len(branches) > 0 {
pkg.RemoteBranch = branches[len(branches)-1]
}
if debug.Value >= 1 {