Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60595f3

Browse files
authored
chore: ignore.git directories in terraform modules (#18255)
.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
1 parent3f406c7 commit60595f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎provisioner/terraform/modules.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ func GetModulesArchive(root fs.FS) ([]byte, error) {
103103
if!fileMode.IsRegular()&&!fileMode.IsDir() {
104104
returnnil
105105
}
106+
107+
// .git directories are not needed in the archive and only cause
108+
// hash differences for identical modules.
109+
iffileMode.IsDir()&&d.Name()==".git" {
110+
returnfs.SkipDir
111+
}
112+
106113
fileInfo,err:=d.Info()
107114
iferr!=nil {
108115
returnxerrors.Errorf("failed to archive module file %q: %w",filePath,err)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp