-
Notifications
You must be signed in to change notification settings - Fork 2
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
Avoid Git's dubious ownership error #74
Conversation
I've tested this via
like you said, but I am still getting the error. If I understood correctly, your change works specifically for the "ownership" case, i.e. when the "dubious" repo is owned by the user. That is not the case for me afaik, I am passing the check because I have an exemption for the directory in my Side note: the installation command I quoted above produces errors due to version incompatibility with current
and calling
which I've fixed manually by passing |
Thanks @DeinAlptraum, this clarified the issue! I refreshed my memory from Darker's commit history, and the only reason for invoking Git with a clean environment was to ensure its terminal output is always in English. So I'll attack this from the opposite direction and only modify locale related variables while keeping the rest of the environment intact. The Darker/Darkgraylib version incompatibility was expected, I'll make sure to take care of that one too. |
@DeinAlptraum, the latest fix in this branch now keeps the evironment and only modifies
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comments, but this looks good to me and fixes the issue on my end!
`LC_ALL` takes precedence over other language affecting locale environment variables. Set it to `C.UTF-8` before calling Git, and otherwise pass through the environment unmodified.
c28c65a
to
e95b765
Compare
When running Git, don't remove any environment variables. Instead, just override
LC_ALL=C.UTF-8
. Also add a test which verifies that this is sufficient to ensure Git's output is in English.Fixes akaihola/darker#524
Fixes akaihola/darker#590
The original flawed plan was:
add some environment variables which are needed to avoid Git's dubious ownership detection:$HOME
on Windows/MinGW$EUID
and$SUDO_UID
on UnixSee:https://github.com/git/git/blob/39bf06ad/git-compat-util.h#L566-L585https://github.com/git/git/blob/39bf06ad/compat/mingw.c#L2740-L2858