PROBLEM
git log --pretty=oneline $branch...$version
Allows me to determine how many commits are between the specified branch and tag. Each commit is printed to the console window on a different line, and starts with 40 characters of that commit's SHA and is followed by a brief description.
Using PowerShell, I would like to take the count of all these commits and assign it to a variable. I don't want to output this data to a file.
My assumption is that a large regex would be the best option, but I'm thinking that there must be an easier solution.
QUESTION
Is there an easier way to find the count of multiple lines outputted to the console?
Also, is there a way to get around the buffer size when handling the log data without adjusting the buffer-size of the console window? Or is this a factor I will need to worry about at all? (when handling a large amount of commits)