Skip to content

Commit 22d8ab9

Browse files
committed
chore: add comment
1 parent 7a0c0d5 commit 22d8ab9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

go/porcelain/deploy.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,13 @@ func createHeader(archive *zip.Writer, i os.FileInfo, runtime string) (io.Writer
979979
return archive.CreateHeader(&zip.FileHeader{
980980
CreatorVersion: 3 << 8, // indicates Unix
981981
ExternalAttrs: 0777 << 16, // -rwxrwxrwx file permissions
982-
Comment: i.Name(),
983-
Name: "bootstrap",
984-
Method: zip.Deflate,
982+
983+
// we need to make sure we don't have two ZIP files with the exact same contents - otherwise, our upload deduplication mechanism will do weird things.
984+
// adding in the function name as a comment ensures that every function ZIP is unique
985+
Comment: i.Name(),
986+
987+
Name: "bootstrap",
988+
Method: zip.Deflate,
985989
})
986990
}
987991
return archive.Create(i.Name())

0 commit comments

Comments
 (0)