From 9c9712d342f8bddedd69ece74d2019316ac56273 Mon Sep 17 00:00:00 2001 From: Yasuharu Ozaki Date: Sat, 21 Jun 2014 21:41:30 +0900 Subject: [PATCH] Support push.default simple Git 2.0 set default push.default to simple. This commit enables gh to support simple push strategy. --- commands/browse.go | 3 +-- github/localrepo.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/commands/browse.go b/commands/browse.go index d055df1..a8ae332 100644 --- a/commands/browse.go +++ b/commands/browse.go @@ -69,8 +69,7 @@ func browse(command *Command, args *Args) { project = github.NewProject("", flagBrowseProject, "") } else { // gh browse - branch, project, err = localRepo.RemoteBranchAndProject("") - utils.Check(err) + branch, project, _ = localRepo.RemoteBranchAndProject("") } if project == nil { diff --git a/github/localrepo.go b/github/localrepo.go index 3f19409..2840bdd 100644 --- a/github/localrepo.go +++ b/github/localrepo.go @@ -108,7 +108,7 @@ func (r *GitHubRepo) RemoteBranchAndProject(owner string) (branch *Branch, proje } pushDefault, _ := git.Config("push.default") - if pushDefault == "upstream" || pushDefault == "tracking" { + if pushDefault == "upstream" || pushDefault == "tracking" || pushDefault == "simple" { branch, err = branch.Upstream() if err != nil { return