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

Replace invalid config key scriv.user_nick with scriv.userNick #131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mdickinson
Copy link

This PR is a proposed fix for #130: it replaces scriv.user_nick with scriv.userNick.

It's rather hard to write a regression test for the issue, since the error only occurs when invoking git itself, but I've tightened up the FakeGit.set_config method to reject most config keys that Git wouldn't allow. The GIT_CONFIG_KEY regex is based on my best guesses from reading the git-config docs: as I understand it, section names allow alphanumeric characters, "-" and ".", subsection names allow almost any character, and the key name must start with an alphabetic character and contain only alphabetic characters and "-".

I believe no backwards compatibility mechanism is needed here: it looks as though the old config key scriv.user_nick isn't accepted by Git, so presumably no-one is using this feature successfully. I did wonder whether this represents a recent change in Git, but I haven't managed to find any evidence that that's the case.

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

Successfully merging this pull request may close these issues.

1 participant