Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local commentChar config is not honored. #766

Closed
rnovacek opened this issue Feb 28, 2018 · 4 comments
Closed

Local commentChar config is not honored. #766

rnovacek opened this issue Feb 28, 2018 · 4 comments

Comments

@rnovacek
Copy link

I'm working on a project that has a convention that all commit messages start with a hash sign # and id of a github issue.

For example:

#15 Fix bug in whatever feature

Unfortunately Git Cola doesn't allow me to enter the hash sign as first character of the commit message. I have to use terminal to do that commit (git commit -m '#15 Fix bug in whatever feature or git commit and enter the message in editor - with changed commentchar config to something else).

Given that git commits starting with # sign are legal, it would be nice if Git Cola could allow creating them.

@Vdragon
Copy link
Contributor

Vdragon commented Feb 28, 2018

Probably a duplicate of issue #383

@rnovacek
Copy link
Author

Ah, I just realized that Git Cola takes global core.commentChar in account when checking the commit message. After running git config --global core.commentChar ";" I can use # in commit message.

But it would be great if it would also honor local commentChar settings.

@rnovacek rnovacek changed the title Commit message can't start with hash sign Local commentChar config is not honored. Feb 28, 2018
@davvid
Copy link
Member

davvid commented Mar 1, 2018

Nice catch. It wasn't handling the case when the repository changes, which also has a side-effect of not honoring the local commentchar if it was already set globally. I'll be pushing a fix for this shortly, give it a try. Thanks for the report.

@davvid davvid closed this as completed in c36fd33 Mar 1, 2018
@rnovacek
Copy link
Author

rnovacek commented Mar 1, 2018

Works great now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants