-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Make -f
the default behavior for dolt fetch
#4943
Comments
This happens when you force push a ref to the remote. Git automatically force updates refs with a warning when you fetch:
Not sure why we do not force update the ref. Will check with team before fixing. |
The workaround is to use the
|
I have also seen this. @alecstein next time you see it, tar up the directory and put it on Google drive. |
Great info and workaround from @druvv. Sounds like we should update this error message to explain what's (likely) going on and how to move forward with the |
https://drive.google.com/file/d/10VWzRLFbxYvpwm1qbUXDhk85p-teRp3u/view?usp=sharing Here's a link with a repo that reproduces one of these. Can we please debug? |
Here is the repro: mkdir remote clone1
cd clone1
dolt init
dolt sql -q "create table t (pk int primary key);"
dolt commit -Am "commit1"
dolt remote add origin file://../remote
dolt push origin main
cd ..
dolt clone file://./remote clone2
cd clone1
dolt commit --amend -m "commit1 edited"
dolt push origin main -f
cd ../clone2
dolt fetch # <- thows the can't fast forward error
dolt fetch -f # <- works We should probably remove the |
-f
the default behavior for dolt fetch
I get this error intermittently and have for a long time now.
dolt fetch <remote-name>
results in
The way to fix it has been to remove and re-add the remote. Then fetching works fine.
I can't repro because I don't know what causes it. It seems to happen randomly.
The text was updated successfully, but these errors were encountered: