GitPython icon indicating copy to clipboard operation
GitPython copied to clipboard

config_writer().set_value stopped working

Open frobijn opened this issue 2 years ago • 1 comments

Since a recent update of GitPython execution of the method:

<repo>.config_writer().set_value("core", "longpaths", "true").release()

fails with error message "--config is not allowed, use allow_unsafe_options=True to allow it."

The message was added by the 24 december 2022 commit of https://github.com/gitpython-developers/GitPython/commits/main/git/cmd.py when a check for unsafe options was introduced. No changes have been made to the methods of the config_writer to compensate for the check for unsafe options, so presumably they all will fail (at least the set_value method does).

frobijn avatar Jan 25 '23 11:01 frobijn

Thanks for reporting! It seems there is no test covering making changes to configuration files then.

I hope a fix can be contributed that adds a test, and the fix by allowing these unsafe options when writing configuration files.

Byron avatar Jan 25 '23 14:01 Byron