GitPython
GitPython copied to clipboard
GitConfigParser doesn't ignore comments at the end of the line
GitConfigParser doesn't ignore comments at the end of the line. So, with a configuration file with the next content:
[alias]
a = add # add
'add # add'
is saved as the value of a.
That isn't a big problem. But if the configuration file contains something like this:
[mergetool "mvimdiff"]
cmd="mvim -c 'Gdiff' $MERGED" # use fugitive.vim for 3-way merge
keepbackup=false
The multi line mode is enabled at config.py#L347 (is_multi_line) and the rest of options are ignored because every line is added as the value of cmd
.