diff options
| author | Jeff Carr <[email protected]> | 2025-01-29 08:16:53 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-29 12:22:03 -0600 |
| commit | 807a9656029deb0c678403ea51627303e043a3fd (patch) | |
| tree | d106af2dedbe0e2d36563e67f4143e9855fc8c7f /branches.go | |
| parent | 6b8ef6fc60a6ce7540e2def69d118c8baf8cf0cb (diff) | |
rm old code
Diffstat (limited to 'branches.go')
| -rw-r--r-- | branches.go | 13 |
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 +} |
