15 lines
285 B
Go
15 lines
285 B
Go
|
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
|
||
|
}
|