[build] Use 'git rev-list --count' to count commits.#24771
Conversation
This is much nicer than usting 'git log --oneline' and then counting the number of lines.
There was a problem hiding this comment.
Pull request overview
This PR simplifies commit distance calculation in the build system by replacing the verbose git log --oneline | wc -l | sed -e 's/ //g' command with the more direct git rev-list --count command. This change makes the build configuration script cleaner and more maintainable.
Changes:
- Replaced two instances of
git log --oneline | wc -l | sedwithgit rev-list --countfor calculating commit distances
✅ [CI Build #50ab662] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #50ab662] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #50ab662] Build passed (Build macOS tests) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #50ab662] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
This is much nicer than usting 'git log --oneline' and then counting the number of lines.