Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork948
Closed
Labels
Description
According to thegit documentation, wrapping quotes are not part of a config value:
If
value
needs to contain leading or trailing whitespace characters, it must be enclosed in double quotation marks ("
).
See the git CLI:
$ cat .git/config[user] name ="Jane Doe"$ git config get user.nameJane Doe
However, GitPython preserves quotes:
>>>fromgit.configimportGitConfigParser>>>parser=GitConfigParser(".git/config")>>>username=parser.get_value("user","name")>>>print(username)"Jane Doe"