-
Notifications
You must be signed in to change notification settings - Fork 285
(GH-585/CONT-998) Fix for safe_directory logic #605
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
(GH-585/CONT-998) Fix for safe_directory logic #605
Conversation
Due to mistake in the logic unsafe directory was previously removed on every other run. The logic previously checked whether the unsafe directory needed to be added, removing it if this was false without taking into account when it was already set but we wanted it to be left in place.
d3b519a
to
dcf9ac6
Compare
Can we get some sort of test on this logic please? 😄 |
There already is one that should have caught this. Not sure why it didn't |
e02932a
to
6db82af
Compare
6db82af
to
04d5e68
Compare
…stem level Safe directory is now set at a system wide level rather than at a global user level in order to ensure it is as effective as possible.
7da43e5
to
64586c3
Compare
Test added/updated |
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.
LGTM
Doing this at system level is a problem when running puppet as non-root, which I am doing in a container. Non-root users can't write to /etc/gitconfig. I will see if I can create that file in the containers /etc folder to be writable. - Update: I had to make /etc/ directory in the container writable by my non-root user, making the gitconfig file writable wasn't enough. |
Due to mistake in the logic unsafe directory was previously removed on every other run. The logic previously checked whether the unsafe directory needed to be added, removing it if this was false without taking into account when it was already set but we wanted it to be left in place.
In addition: safe directory is now set at a system wide level rather than at a global user level in order to ensure it is as effective as possible.