Skip to content
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

Clean-retry on "fatal: bad object" #2218

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Clean-retry on "fatal: bad object" #2218

merged 1 commit into from
Jul 18, 2023

Conversation

DrJosh9000
Copy link
Contributor

@DrJosh9000 DrJosh9000 commented Jul 18, 2023

On the theory that mirrors sometimes have objects gc-ed that are still referred to by existing checkout directories, make fatal: bad object an error that we can try to recover from by deleting the checkout directory and re-cloning.

I made gitErrorFetchBadObject its own enum value, in case we want to apply the recovery only when git mirrors are enabled.

cc #2208

@DrJosh9000 DrJosh9000 requested a review from a team July 18, 2023 06:01
Copy link
Contributor

@triarius triarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice solution 🕵️🔍🧙

@DrJosh9000 DrJosh9000 merged commit bc4e611 into main Jul 18, 2023
@DrJosh9000 DrJosh9000 deleted the git-mirror-wat branch July 18, 2023 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants