mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-04 23:37:41 +02:00
actually don't even bother limiting
This commit is contained in:
parent
3f7ec3f3b8
commit
919463ff02
@ -1117,7 +1117,6 @@ func (c *GitCommand) FetchRemote(remoteName string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetReflogCommitsOptions struct {
|
type GetReflogCommitsOptions struct {
|
||||||
Limit int
|
|
||||||
Recycle bool
|
Recycle bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1127,12 +1126,7 @@ func (c *GitCommand) GetReflogCommits(lastReflogCommit *Commit, options GetReflo
|
|||||||
commits := make([]*Commit, 0)
|
commits := make([]*Commit, 0)
|
||||||
re := regexp.MustCompile(`(\w+).*HEAD@\{([^\}]+)\}: (.*)`)
|
re := regexp.MustCompile(`(\w+).*HEAD@\{([^\}]+)\}: (.*)`)
|
||||||
|
|
||||||
limitArg := ""
|
cmd := c.OSCommand.ExecutableFromString("git reflog --abbrev=20 --date=unix")
|
||||||
if options.Limit > 0 {
|
|
||||||
limitArg = fmt.Sprintf("-%d", options.Limit)
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd := c.OSCommand.ExecutableFromString(fmt.Sprintf("git reflog --abbrev=20 --date=unix %s", limitArg))
|
|
||||||
onlyObtainedNewReflogCommits := false
|
onlyObtainedNewReflogCommits := false
|
||||||
err := RunLineOutputCmd(cmd, func(line string) (bool, error) {
|
err := RunLineOutputCmd(cmd, func(line string) (bool, error) {
|
||||||
match := re.FindStringSubmatch(line)
|
match := re.FindStringSubmatch(line)
|
||||||
|
@ -81,8 +81,6 @@ func (gui *Gui) handleCommitSelect(g *gocui.Gui, v *gocui.View) error {
|
|||||||
func (gui *Gui) refreshReflogCommitsConsideringStartup() {
|
func (gui *Gui) refreshReflogCommitsConsideringStartup() {
|
||||||
switch gui.State.StartupStage {
|
switch gui.State.StartupStage {
|
||||||
case INITIAL:
|
case INITIAL:
|
||||||
gui.refreshReflogCommits(refreshReflogOptions{Limit: 100, Recycle: false})
|
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
gui.refreshReflogCommits(refreshReflogOptions{Recycle: false})
|
gui.refreshReflogCommits(refreshReflogOptions{Recycle: false})
|
||||||
gui.refreshBranches()
|
gui.refreshBranches()
|
||||||
|
@ -47,7 +47,6 @@ func (gui *Gui) handleReflogCommitSelect(g *gocui.Gui, v *gocui.View) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type refreshReflogOptions struct {
|
type refreshReflogOptions struct {
|
||||||
Limit int
|
|
||||||
Recycle bool
|
Recycle bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user