Description
Description
When the git repo instance is configured to show signatures (log.showsignature=True
) -- all signed commits are excluded from the changelog produced by Commitizen
Steps to reproduce
- git config log.showsignature true
- cz ch --dry-run > broken
- git config log.showsignature false
- cz ch --dry-run > fixed
- vimdiff broken fixed
Current behavior
Any signed commits are missing from the changelog because git.py's get_commits()
retrieves just the gpg signature line
Desired behavior
The actual commit message should be retrieved and included in the changelog, regardless of the repo instance's git configuration
Suggested Fix
Change line 80 of git.py from
git_log_cmd = f"git --pretty={log_format}{delimiter} {args}"
to
git_log_cmd = f"git -c log.showsignature=False log --pretty={log_format}{delimiter} {args}"
This will ensure that log.showsignature is false for the purpose of retrieving commits within Commitizen, but will not alter the underlying git repository's configuration as the -c
flag applies for that command only.
Environment
- commitizen version: 2.17.11
- python version: 3.6.9
- operating system: Linux