summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-11-16 16:00:47 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-11-21 22:07:14 +1100
commit325408d0e3db8e1b7d0b6915986f1a684ee8b257 (patch)
treedbc0ca0823c745950d113678b0379662e914827b /pkg/commands/git.go
parenteeb667954fd2df5faf1df227a823dd5720bb3171 (diff)
get remote branches when getting remotes
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r--pkg/commands/git.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 55f8dddb9..ad275d10f 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -1061,40 +1061,3 @@ func (c *GitCommand) BeginInteractiveRebaseForCommit(commits []*Commit, commitIn
func (c *GitCommand) SetUpstreamBranch(upstream string) error {
return c.OSCommand.RunCommand(fmt.Sprintf("git branch -u %s", upstream))
}
-
-func (c *GitCommand) GetRemotes() ([]*Remote, error) {
- goGitRemotes, err := c.Repo.Remotes()
- if err != nil {
- return nil, err
- }
-
- return nil, nil
-
- remotes := make([]*Remote, len(goGitRemotes))
-
- // TODO: consider including the goGitRemote itself
- for i, goGitRemote := range goGitRemotes {
- goGitBranches, err := goGitRemote.List(&gogit.ListOptions{})
- if err != nil {
- c.Log.Warn(err)
- continue
- }
-
- branches := []*Branch{}
- for _, goGitBranch := range goGitBranches {
- // for now we're only getting branch references, not tags/notes/etc
- if goGitBranch.Name().IsBranch() {
- branches = append(branches, &Branch{
- Name: goGitBranch.Name().String(),
- })
- }
- }
-
- remotes[i] = &Remote{
- Name: goGitRemote.Config().Name,
- Urls: goGitRemote.Config().URLs,
- Branches: branches,
- }
- }
- return remotes, nil
-}