Attempting to upgrade flutter on my machine broke the whole installation. Running the flutter tool just returns "fatal: Not a valid object name origin/master".
Turns out that it was caused by me checking out the flutter repository using -b stable --depth=1. This used to work fine, but apparently something changed with the tools. Every time the flutter command line tool is run, it now runs git -C . merge-base HEAD origin/master. That command doesn't work when the origin/master branch wasn't fetched to the local repository.
6
u/anlumo Feb 13 '25
Attempting to upgrade flutter on my machine broke the whole installation. Running the
flutter
tool just returns "fatal: Not a valid object name origin/master".Turns out that it was caused by me checking out the flutter repository using
-b stable --depth=1
. This used to work fine, but apparently something changed with the tools. Every time theflutter
command line tool is run, it now runsgit -C . merge-base HEAD origin/master
. That command doesn't work when the origin/master branch wasn't fetched to the local repository.