buildstream/_gitsourcebase.py: Fix return of get_ref() when no ref is available

That was causing invalid warning. Fixes #1020.
1 file changed