-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull doesn't work from v0.39.1 since fetchAll is enabled by default #3181
Comments
What do the logs say? Run Does this happen with all repos or just this one? Does pulling from the |
Sounds related to #2999, maybe. That, however, should be no different between 0.38.2 and 0.40.2. The most important question would be if this happens always, or only sometimes. If it's only sometimes, then my guess would be that it's related to the sync mutex (like #2999), and in that case it would be solved by #3021, which removes the sync mutex. @Tim-Cao Are you able to build from source and could try a master build? |
Hi @mark2185
lazygit --logs
It happens on all repos and pulling from cli works |
Hi @stefanhaller, master build also doesn't work. It happens always. |
The panic log you posted above clearly shows the sync lock problem that I was referring to above. It would be interesting to see a similar log from running master, which doesn't have the sync lock any more. If you can reliably reproduce the issue with v0.40.2, but not with v0.38.2, then it would be most helpful if you could bisect to the commit where it starts to fail for you. |
Hi @stefanhaller, this issue starts with v0.39.1. The root cause should be #2692 |
Thanks for investigating. It seems you have one remote that hangs when you try to fetch it. Does As for the config default, we had an elaborate discussion about this in #2692, I don't see a reason to question the decision right now. |
hmm, actually, I have dozens of remotes. But I only need to sync to upstream or origin selected by master branch. It wastes too much time to fetch all. |
So are you saying that it doesn't actually hang, but only takes a long time? In that case it sounds like you just need to set the fetchAll config to false because that's your preference, and we don't have an issue here. |
Hi @stefanhaller, |
No, I don't think so. But I don't understand why you are asking; lazygit doesn't pass |
I don't think so. My guess is that the "Fetching" output is from a background fetch. I'm a little bit confused about the screenshot because the output from two commands seem to be intermingled, but my guess is that this is not a master build, but the latest release, which still has the sync lock. So what happens is that right after startup the first background fetch starts, grabs the sync lock, prints the "Fetching" lines, and then hangs for some reason. Then, when you pull, it prints "Pull" to the log, and before doing anything it blocks forever trying to get the sync lock. So again, two questions that I asked before, but didn't get an answer for:
|
Hi @stefanhaller, I just tested on master build again. I'm at d97b37a |
This warning doesn't come from lazygit, but from git itself. I don't understand why you are getting the warning here; usually it only appears when your local branch diverged from upstream, which doesn't seem to be the case here (master can be fast-forwarded). I don't have any ideas about this one, anybody else? In general, btw, my advice is to set |
Hi @stefanhaller, the warning might be a bug on master of lazygit, if doesn't set up pull configuration, that warning will always show in the first time but disappear in the second time. In previous published versions, it doesn't have that warning in the first time. Actual.mp4 |
Thanks for the video. It looks like the first pull happens at the same time as the initial background fetch when it's still busy fetching master's upstream; maybe there's some concurrency issue related to this. We already know that there can be cases where spurious errors occur because of this (see for example #3180 (comment), which is slightly different). I don't totally understand what's going on yet, but I can try to look into it more. Meanwhile you probably want to set fetchAll to false, as you said above. Your video shows that fetching your remotes is so slow that you probably don't want to do that all the time. |
Hi @stefanhaller,
They are same. If have pull config, like
Exactly! Thanks |
Is there any update? @stefanhaller |
Yes. I just opened a PR (#3202) that fixes the "Cannot rebase onto multiple branches" error. I couldn't reproduce the other error ("You have divergent branches") locally, so I'm not sure if it also fixes that one. Would be great if you could test this, if you can build from source. |
Hi @stefanhaller, I tested on the #3202, both But this issue still happens, do you have another pr to fix it? Additionally, if quit the lazygit during fetching, it will continue when launch lazygit again.
|
That's good to hear, thanks for testing.
I don't understand the problem. This is by design, |
Hi @stefanhaller, |
That's not what it's doing. When you do a pull, it does not call fetch, only pull. What you are seeing is the initial background fetch; in the v0.40.2 release the pull command would block until the background fetch is finished, but now on master the pull is allowed to run in parallel to the background fetch. That's why you see both next to each other in the log. You can confirm this by waiting for the fetch to be complete, and then pressing "p"; you'll see that it doesn't call fetch. |
Hi @stefanhaller, |
Lazygit has a feature to periodically run git fetch in the background, to keep your remotes up to date without you having to fetch manually. The first of these runs right after startup, from then on it runs every 60 seconds by default. You can change the frequency with the |
@stefanhaller |
That's your choice. I thought we agreed above that it makes sense for you to turn off |
@stefanhaller |
No, |
@stefanhaller |
That would solve it for you, yes. Whether that's what you want is not something I can decide for you; you'll have to decide this yourself. |
Got it. I really appreciate your help. Look forward to the new release. @stefanhaller |
Describe the bug
Pull doesn't work on v0.40.2
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The pull should complete less than 1 mins.
Actual behavior
The pull keeps running.
Screenshots
![Actual](https://private-user-images.githubusercontent.com/52661397/292574162-5e584c23-f05b-4a62-9036-f934a619731d.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDQyNjgsIm5iZiI6MTczOTEwMzk2OCwicGF0aCI6Ii81MjY2MTM5Ny8yOTI1NzQxNjItNWU1ODRjMjMtZjA1Yi00YTYyLTkwMzYtZjkzNGE2MTk3MzFkLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDEyMjYwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFhMGI3OWUxNTg3NjZkZTZlYzY1MjIyOTI2ZmY0N2RlMGZlOWRhMTYyYmZlNThkODczNTQzZDY4NDA0MzVkZTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.v4cIG80igTMJ_dgk3QwaemVv5wkXDfOkE-pDS68KdQo)
Version info:
commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=linux, arch=amd64, git version=2.43.0
ubuntu 22.04
Last Working Version
v0.38.2
The text was updated successfully, but these errors were encountered: