Support bare repo directories that do not end with .git

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Konstantin Ryabitsev <mricon@kernel.org>