Merge remote-tracking branch 'origin/polecat/Immortan'
# Conflicts: # internal/refinery/engineer.go # internal/refinery/engineer_test.go
This commit is contained in:
@@ -364,7 +364,7 @@ func (g *Git) RemoteBranchExists(remote, branch string) (bool, error) {
|
||||
return out != "", nil
|
||||
}
|
||||
|
||||
// DeleteBranch deletes a branch.
|
||||
// DeleteBranch deletes a local branch.
|
||||
func (g *Git) DeleteBranch(name string, force bool) error {
|
||||
flag := "-d"
|
||||
if force {
|
||||
@@ -374,6 +374,12 @@ func (g *Git) DeleteBranch(name string, force bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteRemoteBranch deletes a branch from the remote.
|
||||
func (g *Git) DeleteRemoteBranch(remote, branch string) error {
|
||||
_, err := g.run("push", remote, "--delete", branch)
|
||||
return err
|
||||
}
|
||||
|
||||
// Rev returns the commit hash for the given ref.
|
||||
func (g *Git) Rev(ref string) (string, error) {
|
||||
return g.run("rev-parse", ref)
|
||||
|
||||
Reference in New Issue
Block a user