Skip to content

Commit

Permalink
internal/git: remove unused CurrentUpstreamBranch function
Browse files Browse the repository at this point in the history
The last usage of this function was removed on 8a72102 ("mr create:
Clean up variable names"), but the function was left behind. This patch
completely removes it from source code.

Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
  • Loading branch information
bmeneg committed Jun 24, 2021
1 parent 86581e4 commit 6c5a5d6
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions internal/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,6 @@ func CurrentBranch() (string, error) {
return strings.TrimSpace(string(branch)), nil
}

// CurrentUpstreamBranch returns the upstream of the currently checked out branch
func CurrentUpstreamBranch() (string, error) {
localBranch, err := CurrentBranch()
if err != nil {
return "", err
}

branch, err := UpstreamBranch(localBranch)
if err != nil {
return "", err
}
return branch, nil
}

// UpstreamBranch returns the upstream of the specified branch
func UpstreamBranch(branch string) (string, error) {
upstreamBranch, err := gitconfig.Local("branch." + branch + ".merge")
Expand Down

0 comments on commit 6c5a5d6

Please sign in to comment.