Current checkout detection fixed for bare repositories