Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use null-delimiting when interacting with git check-ignore and disable git octal quoting #1760

Closed
mjpieters opened this issue Jun 21, 2021 · 0 comments · Fixed by #1761
Closed

Comments

@mjpieters
Copy link
Contributor

Currently, the git check-ignore command result is parsed with using an unsupported legacy function in codecs, because git can output \OOO octal escape codes for any 'unusual' characters.

Instead of using undocumented functions, isort should simply disable the git quoting features:

  • Disable core.quotePath (pass -c core.quotePath=).
  • Use null delimiting instead of linefeed delimiting (pass -z, read and write filenames with \0 as the delimiter)

This would also allow isort to just use the subprocess encoding and decoding support, provided git is explicitly configured to expect and produce UTF-8 (set the LANG=C.UTF-8 environment variable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant