patch applied (hugs98): Make repository base calculation more lenient, allowing e.g. GHC branches