-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Describe the bug
I suspect this line is intended to introduce an initial delay before autoFetch for recently used repositories:
Lines 81 to 83 in c3cf48c
| if !isNew { | |
| time.After(time.Duration(userConfig.Refresher.FetchInterval) * time.Second) | |
| } |
However, since time.After returns a channel, the correct implementation should be:
if !isNew {
<-time.After(time.Duration(userConfig.Refresher.FetchInterval) * time.Second)
} As a result, there is no initial delay before autoFetch starts.
To Reproduce
Steps to reproduce the behavior:
- Open LazyGit on a recently used repository.
- Observe that autoFetch runs immediately.
Expected behavior
The first autoFetch should occur after refresher.fetchInterval, assuming my interpretation is correct.
Screenshots
If applicable, add screenshots to help explain your problem.
Version info:
commit=, build date=, build source=nix, version=0.44.1, os=darwin, arch=arm64, git version=2.46.0
git version 2.46.0
Additional context
Add any other context about the problem here.