pigar icon indicating copy to clipboard operation
pigar copied to clipboard

Fixed too many values to unpack error in `parse_git_config`

Open dsimmie opened this issue 4 years ago • 1 comments

The helper function parse_git_config breaks if there is config with multiple equals operators.

The git-credentials-helper stores information using this syntax for one.

Sample gitconfig that will error on too many values to unpack as parse_git_config function only expects single equality operator.

[user]
	email = [email protected]
	name = Pigar
[core]
    editor = vim
[credential]
    helper = cache --timeout=3600

This PR adds a 1 to the split function in parse_git_config to make it split on first occurrence only and fixes the issue mentioned above. A simple test is also provided.

dsimmie avatar Aug 18 '21 11:08 dsimmie

Hello @dsimmie! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-08-18 12:21:31 UTC

pep8speaks avatar Aug 18 '21 11:08 pep8speaks