From c1657c45eb4b6e3fb292ba796e9b3d9849ab4dc5 Mon Sep 17 00:00:00 2001 From: Nick Ripley Date: Wed, 15 Jul 2026 08:53:58 -0400 Subject: [PATCH] cmd/distpack: exclude the .jj directory The .jj directory is created by the JJ version control system, which works on top of Git and is used by several Go contributors. Exclude this directory from binary and source distributions. Fixes #80408 Change-Id: I559d7bfa7991d52a059cb9aae279cd1d6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/799983 Reviewed-by: Michael Matloob LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Matloob --- src/cmd/distpack/pack.go | 1 + src/cmd/distpack/test.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/cmd/distpack/pack.go b/src/cmd/distpack/pack.go index 09c3a33119..53e9dbd73b 100644 --- a/src/cmd/distpack/pack.go +++ b/src/cmd/distpack/pack.go @@ -113,6 +113,7 @@ func main() { ".gitattributes", ".github/**", ".gitignore", + ".jj/**", "VERSION.cache", "misc/cgo/*/_obj/**", "**/.DS_Store", diff --git a/src/cmd/distpack/test.go b/src/cmd/distpack/test.go index 7479bd77f5..7fd2dad57b 100644 --- a/src/cmd/distpack/test.go +++ b/src/cmd/distpack/test.go @@ -30,6 +30,7 @@ var srcRules = []testRule{ {name: "go/.git", exclude: true}, {name: "go/.gitattributes", exclude: true}, {name: "go/.github", exclude: true}, + {name: "go/.jj", exclude: true}, {name: "go/VERSION.cache", exclude: true}, {name: "go/bin/**", exclude: true}, {name: "go/pkg/**", exclude: true}, @@ -48,6 +49,7 @@ var zipRules = []testRule{ {name: "go/.git", exclude: true}, {name: "go/.gitattributes", exclude: true}, {name: "go/.github", exclude: true}, + {name: "go/.jj", exclude: true}, {name: "go/VERSION.cache", exclude: true}, {name: "go/bin", exclude: true}, {name: "go/pkg", exclude: true}, @@ -84,6 +86,7 @@ var modRules = []testRule{ {name: "golang.org/toolchain@*/.git", exclude: true}, {name: "golang.org/toolchain@*/.gitattributes", exclude: true}, {name: "golang.org/toolchain@*/.github", exclude: true}, + {name: "golang.org/toolchain@*/.jj", exclude: true}, {name: "golang.org/toolchain@*/VERSION.cache", exclude: true}, {name: "golang.org/toolchain@*/bin", exclude: true}, {name: "golang.org/toolchain@*/pkg", exclude: true},