summaryrefslogtreecommitdiff
path: root/branches.go
diff options
context:
space:
mode:
Diffstat (limited to 'branches.go')
-rw-r--r--branches.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/branches.go b/branches.go
index 085380c..a2635d7 100644
--- a/branches.go
+++ b/branches.go
@@ -37,3 +37,16 @@ func (repo *Repo) ExistsUserBranch() bool {
}
return false
}
+
+// returns true if the devel branch exists
+func (repo *Repo) ExistsDevelBranch() bool {
+ if repo.GetDevelBranchName() == "" {
+ return false
+ }
+ branchname := repo.GetDevelBranchName()
+ if repo.Exists(filepath.Join(".git/refs/heads", branchname)) {
+ // todo: actually use .git/config
+ return true
+ }
+ return false
+}