More robust commit location parsing