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

Comments

Projects
None yet
3 participants
@rnovacek

rnovacek commented Feb 28, 2018

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

This comment has been minimized.

Contributor

Vdragon commented Feb 28, 2018

Probably a duplicate of issue #383

@rnovacek

This comment has been minimized.

rnovacek commented Feb 28, 2018

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 from Commit message can't start with hash sign to Local commentChar config is not honored. Feb 28, 2018

@davvid

This comment has been minimized.

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 in c36fd33 Mar 1, 2018

@rnovacek

This comment has been minimized.

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