diff options
Diffstat (limited to 'branches.go')
| -rw-r--r-- | branches.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/branches.go b/branches.go index b656522..c717db9 100644 --- a/branches.go +++ b/branches.go @@ -2,7 +2,6 @@ package gitpb import ( "errors" - "fmt" "os" "path/filepath" "strings" @@ -76,28 +75,6 @@ func (repo *Repo) GetBranchDifferences(to string, from string) []string { return result.Stdout } -// deletes the devel local branch if it is a subset of the remote devel branch -func (repo *Repo) DeleteLocalDevelBranch() error { - branch := repo.GetDevelBranchName() - remote := filepath.Join("origin", branch) - - if !repo.IsDevelRemote() { - return fmt.Errorf("no remote branch") - } - - b1, err := repo.CountDiffObjects(branch, remote) // should be zero - if err != nil { - return err - } - if b1 == 0 { - cmd := []string{"git", "branch", "-D", repo.GetDevelBranchName()} - _, err := repo.RunVerboseOnError(cmd) - return err - } else { - return fmt.Errorf("local branch has patches not in remote") - } -} - // makes a local branch based off of the master branch // (unless a remote devel branch exists. then it uses that) func (repo *Repo) MakeLocalDevelBranch() (*cmd.Status, error) { |
