1 2 3 4 5 6 7 8 9 10 11 12 13 14
package gitpb import ( "path/filepath" ) // returns true if 'git pull' will work func (repo *Repo) IsBranchRemote(branchname string) bool { if repo.Exists(filepath.Join(".git/refs/remotes/origin", branchname)) { // todo: actually use .git/config return true } return false }