1
0
Fork 0
forked from forgejo/forgejo

Update vendor git (#2765)

This commit is contained in:
Lauris BH 2017-10-23 16:36:14 +03:00 committed by GitHub
parent 81d1e54a49
commit 9ba7898911
6 changed files with 25 additions and 63 deletions

View file

@ -7,8 +7,6 @@ package git
import (
"fmt"
"strings"
"github.com/mcuadros/go-version"
)
// BranchPrefix base dir of the branch information file store on git
@ -56,10 +54,6 @@ func (repo *Repository) GetHEADBranch() (*Branch, error) {
// SetDefaultBranch sets default branch of repository.
func (repo *Repository) SetDefaultBranch(name string) error {
if version.Compare(gitVersion, "1.7.10", "<") {
return ErrUnsupportedVersion{"1.7.10"}
}
_, err := NewCommand("symbolic-ref", "HEAD", BranchPrefix+name).RunInDir(repo.Path)
return err
}