[mb2] handle unsupported char in git tag more efficiently

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>
[mb2] untabify

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>
[mb2] reindent

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>