Please sign in to comment.
Properly count the number of commits
The "git log --pretty=format:" command eats up the line feed for the last commit, and thus "wc -l" counts one commit less than there are. This is easy to demonstrate with: $ git log '2.95.3^..2.95.3' --oneline e84de34 config/version: set version to 2.95.3 (OpenELEC-3.0 Beta 3) $ git log '2.95.3^..2.95.3' --pretty=format: | wc -l 0 Even though this is a minor discrepancy, "git rev-list" and "git rev-parse" are simpler and more accurate tools for this task (their output format is not going to change).
- Loading branch information...