- Notifications
You must be signed in to change notification settings - Fork905
chore: ignore.git
directories in terraform modules#18255
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
.git directories were causing identical modules to have differenthashes. This adds unecessary bloat to the database, and the .gitdirectory is not needed for dynamic params
provisioner/terraform/modules.go Outdated
// .git directories are not needed in the archive and only cause | ||
// hash differences for identical modules. |
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.
I usually prefer to put these kinds of comments outside of theif
. Then the explanation actually precedes the condition, rather than explaining it after the fact.
if fileMode.IsDir() && d.Name() == ".git" { | ||
// .git directories are not needed in the archive and only cause | ||
// hash differences for identical modules. | ||
return fs.SkipDir |
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.
TIL
60595f3
intomainUh oh!
There was an error while loading.Please reload this page.
.git directories were causing identical modules to have different hashes. This adds unecessary bloat to the database, and the .git directory is not needed for dynamic params