commentChar default should use git config `core.commentchar`
See original GitHub issueExpected Behavior
Default setting for commentchar
is the output of git config core.commentchar
.
Current Behavior
Default setting for commentchar
is #
.
Affected packages
- cli
- core
- prompt
- config-angular
Context
Hi, thanks for this tool. The commentChar
setting appears to default to #
if not overridden explicitly:
https://github.com/conventional-changelog/commitlint/blob/1ee518caca0cf758c8404554063d1ca42cacba8d/%40commitlint/cli/src/cli.ts#L224-L229
I think it would be better if it defaulted to the output of git config core.commentchar
. I know I can override it in my config, but other people might have it set to something else (I have mine set globally in ~/.gitconfig
) so not sure how I can make that work without being able to specify a global override.
This was brought up before in #2351.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
What does git core.commentChar=auto do? - Stack Overflow
It means a character that's not already in use in the current message before invoking the editor. That might seem redundant — why...
Read more >git-config Documentation - Git
The file /etc/gitconfig can be used to store a system-wide default configuration. The configuration variables are used by both the Git plumbing and...
Read more >Git Tips #3 - Change the Git rebase comment character
The default comment character in an interactive Git rebase is # . This is fine until you want ... git config --global core.commentchar...
Read more >Configure Git's comment character - Sadique Ali
TL;DR - Use the core.commentchar configuration to change the character Git uses to mark comment lines in commit messages.
Read more >579325 – Implement support for core.commentChar - Bugs
This git config can be either a specific character (default #), or "auto", in which case git automatically chooses a character (from the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Works great now, thanks again!
Ah,
yarn test
works (but only afteryarn build
). Might want to update the instructions. All good.