GitPython icon indicating copy to clipboard operation
GitPython copied to clipboard

GitConfigParser doesn't ignore comments at the end of the line

Open jesustorresdev opened this issue 7 years ago • 0 comments

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.

jesustorresdev avatar Jan 31 '18 19:01 jesustorresdev