1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

use reflogs from state to work out branch recencies

This commit is contained in:
Jesse Duffield
2020-03-26 22:51:24 +11:00
parent bd2c1eef53
commit fbbd16bd82
7 changed files with 64 additions and 75 deletions

View File

@ -1126,7 +1126,7 @@ func (c *GitCommand) FetchRemote(remoteName string) error {
func (c *GitCommand) GetNewReflogCommits(lastReflogCommit *Commit) ([]*Commit, error) {
commits := make([]*Commit, 0)
re := regexp.MustCompile(`(\w+).*HEAD@\{([^\}]+)\}: (.*)`)
cmd := c.OSCommand.ExecutableFromString("git reflog --abbrev=20 --date=iso")
cmd := c.OSCommand.ExecutableFromString("git reflog --abbrev=20 --date=unix")
err := RunLineOutputCmd(cmd, func(line string) (bool, error) {
match := re.FindStringSubmatch(line)
if len(match) <= 1 {