diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-27 17:05:07 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-27 17:05:07 +1000 |
commit | 1dcc3363d041733d5d571e2c1075a8120a7d581f (patch) | |
tree | 2cfb2ed67cd9a0b1e679505e8024e815639b3dd2 | |
parent | c6948582e6463bd0825b93129b9f2bad009da7cc (diff) |
support branches with no upstream
-rw-r--r-- | pkg/commands/commit_list_builder.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/commands/commit_list_builder.go b/pkg/commands/commit_list_builder.go index d87393ceb..73f7c305d 100644 --- a/pkg/commands/commit_list_builder.go +++ b/pkg/commands/commit_list_builder.go @@ -111,14 +111,15 @@ func (c *CommitListBuilder) GetCommits(opts GetCommitsOptions) ([]*Commit, error } } + passedFirstPushedCommit := false firstPushedCommit, err := c.getFirstPushedCommit(opts.RefName) if err != nil { - return nil, err + // must have no upstream branch so we'll consider everything as pushed + passedFirstPushedCommit = true } cmd := c.getLogCmd(opts) - passedFirstPushedCommit := false err = RunLineOutputCmd(cmd, func(line string) (bool, error) { if strings.Split(line, " ")[0] != "gpg:" { commit := c.extractCommitFromLine(line) |