add IsBranchRemote()
This commit is contained in:
parent
336ab60e01
commit
829b6ba55f
|
@ -0,0 +1,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
|
||||||
|
}
|
Loading…
Reference in New Issue