Merge "Improve performance of ReceiveCommits for repos with many refs" into stable-2.5