diff options
author | Corentin Rossignon <corossig@gmail.com> | 2020-02-26 23:22:25 +0100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-02-27 09:34:40 +1100 |
commit | bf946200e965cc36ce87fe88721ef6312a45fdf5 (patch) | |
tree | 8911d8f2deef83cce169748b9f86b793e124af6a | |
parent | 890cc87724edb0bf408dd4b4007a4df59f0972ca (diff) |
Fix OutOfBound array access when looking for ReflogCommitsv0.15.5
refs #679
-rw-r--r-- | pkg/commands/git.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 7aceb4610..1e4f1e990 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -1115,7 +1115,7 @@ func (c *GitCommand) GetReflogCommits() ([]*Commit, error) { re := regexp.MustCompile(`(\w+).*HEAD@\{\d+\}: (.*)`) for i, line := range lines { match := re.FindStringSubmatch(line) - if len(match) == 1 { + if len(match) <= 1 { continue } |