Updating fails with "fatal: You are attempting to fetch c2b5b05b2d0fd7a40b9f89b4032c9695e411a388, which is in the commit graph file but not in the object database." #6853
Replies: 2 comments
-
|
This looks like the local Git object DB and commit-graph got out of sync, not that Homebrew is serving a bad commit. That commit and its tree are still readable from GitHub. I could repro the same kind of failure in a throwaway repo by writing a commit-graph, deleting the commit object, then running I’d try this first: cd "$(brew --repo)"
git commit-graph verify
git fetch --refetch origin
brew updateIf fetch still trips over the graph before it can repair things, drop the local commit-graph cache and refetch: cd "$(brew --repo)"
rm -f .git/objects/info/commit-graph
rm -rf .git/objects/info/commit-graphs
git fetch --refetch origin
brew update
|
Beta Was this translation helpful? Give feedback.
-
|
Spot on! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Output of
brew configOutput of
brew doctorDescription of issue
The command
brew updatefails with the following error message:The commit mentioned is according to GitHub not reachable from any branch or tag, and appears to point to a non-existent tree in my git:
Does anyone here have an idea of how my git could have ended up in this state?
Beta Was this translation helpful? Give feedback.
All reactions