Repository navigation
Tell git to treat all directories as safe - #2586
Merged
Merged
Conversation
With a recent change to git [1], running commands like `git rev-parse --show-toplevel` will fail when different directories are owned by different users. Because of the complexity of how we use Docker and expect it to work across different operating systems, the easiest approach is to restore the prior behavior. [2] Rather than trying to run `git config` from within the build process (which runs into its own file permission errors depending on who is running the command), instead we just hardcode the "global" gitconfig file (which is located at the root of the Docker container). [1]: git/git@8959555 [2]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-safedirectory
bmorelli25
approved these changes
Dec 20, 2022
bmorelli25
left a comment
Member
There was a problem hiding this comment.
I'm not qualified to leave a review, but this PR works great locally for me 🚀
This was referenced Dec 20, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With a recent change to git 1, running commands like
git rev-parse --show-toplevelwill fail when different directories are owned by different users. Because of the complexity of how we use Docker and expect it to work across different operating systems, the easiest approach is to restore the prior behavior. 2Rather than trying to run
git configfrom within the build process (which runs into its own file permission errors depending on who is running the command), instead we just hardcode the "global" gitconfig file (which is located at the root of the Docker container).