Deduplicate code

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Drop unused buffer

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Optimize comment about discouraged branch names starting with a dash

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Do not call IsBranchTagNameUnique with empty parameter

Signed-off-by: Sven Strickroth <email@cs-ware.de>