Summary
--git-log-args='--first-parent' has no effect in commitlint v20. All commits in the merge ancestry are still linted despite the flag being passed. This works correctly in v19.
Reproduction
Given a branch with a merge commit (e.g. merging release into a feature branch before PR to main):
# Returns 8 commits
git log --first-parent --oneline origin/main..HEAD
# v19: lints 8 commits ✅
# v20: lints all 43 commits ❌
commitlint --from origin/main --to HEAD --git-log-args='--first-parent'
Expected behaviour
Only first-parent commits should be linted, consistent with v19 behaviour and the CLI
documentation which uses --first-parent as the example for --git-log-args.
Summary
--git-log-args='--first-parent'has no effect in commitlint v20. All commits in the merge ancestry are still linted despite the flag being passed. This works correctly in v19.Reproduction
Given a branch with a merge commit (e.g. merging
releaseinto a feature branch before PR tomain):Expected behaviour
Only first-parent commits should be linted, consistent with v19 behaviour and the CLI
documentation which uses --first-parent as the example for --git-log-args.