summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-03-28 11:27:05 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-03-28 11:59:45 +1100
commit036b53acf8234a719fa8e4652527d4781652e050 (patch)
tree9a557376385417dc56a922a6fd069f88499961d4 /pkg/commands
parent919463ff02266b6f6f9a0bbf0977b35654845537 (diff)
in fact we don't need any of these options
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 1b0d6f4a5..f2a4706cc 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -1116,13 +1116,9 @@ func (c *GitCommand) FetchRemote(remoteName string) error {
return c.OSCommand.RunCommand("git fetch %s", remoteName)
}
-type GetReflogCommitsOptions struct {
- Recycle bool
-}
-
// GetReflogCommits only returns the new reflog commits since the given lastReflogCommit
// if none is passed (i.e. it's value is nil) then we get all the reflog commits
-func (c *GitCommand) GetReflogCommits(lastReflogCommit *Commit, options GetReflogCommitsOptions) ([]*Commit, bool, error) {
+func (c *GitCommand) GetReflogCommits(lastReflogCommit *Commit) ([]*Commit, bool, error) {
commits := make([]*Commit, 0)
re := regexp.MustCompile(`(\w+).*HEAD@\{([^\}]+)\}: (.*)`)
@@ -1143,7 +1139,7 @@ func (c *GitCommand) GetReflogCommits(lastReflogCommit *Commit, options GetReflo
Status: "reflog",
}
- if options.Recycle && lastReflogCommit != nil && commit.Sha == lastReflogCommit.Sha && commit.UnixTimestamp == lastReflogCommit.UnixTimestamp {
+ if lastReflogCommit != nil && commit.Sha == lastReflogCommit.Sha && commit.UnixTimestamp == lastReflogCommit.UnixTimestamp {
onlyObtainedNewReflogCommits = true
// after this point we already have these reflogs loaded so we'll simply return the new ones
return true, nil