dev/sg: explicitly check if revision is found locally in autoupdates
Created by: bobheadxi
It seems the old workaround for detecting missing revision no longer works, since the output of git might have changed. Either way we probably shouldn't depend on git's human output so instead we reuse the logic used to generate warnings in sg ci build
in the update checker
Test plan
Tag a build with a commit that is not yet in remote:
go build -trimpath -ldflags "-X main.BuildCommit=$(git hash)" -o ./sg ./dev/sg
Run a sg
command with -v
:
Run an sg
command without -v: no output :)
Push to remote, and try again with -v
: