aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-01-04 14:12:56 -0500
committerRuss Cox <rsc@golang.org>2017-01-05 01:29:25 +0000
commitf5608c20f7b88c20fa2cd70090d9917df63f5c8e (patch)
treefc278e570a4a2f939c4d768648f7b7d7c197b7d0 /src/runtime/runtime2.go
parentc3fc9b4b81f84f08911ad81a38e388ca5f4462a5 (diff)
downloadgo-f5608c20f7b88c20fa2cd70090d9917df63f5c8e.tar.xz
.gitignore: fix attempt at rooted paths
When I wrote the lines bin/ pkg/ I was trying to match just the top-level bin and pkg directories, and I put the final slash in because 'git help gitignore' says: o If the pattern does not contain a slash /, Git treats it as a shell glob pattern and checks for a match against the pathname relative to the location of the .gitignore file (relative to the toplevel of the work tree if not from a .gitignore file). o Otherwise, Git treats the pattern as a shell glob suitable for consumption by fnmatch(3) with the FNM_PATHNAME flag: wildcards in the pattern will not match a / in the pathname. For example, "Documentation/*.html" matches "Documentation/git.html" but not "Documentation/ppc/ppc.html" or "tools/perf/Documentation/perf.html". Putting a trailing slash was my way of opting in to the "rooted path" semantics without looking different from the surrounding rooted paths like "src/go/build/zcgo.go". But HA HA GIT FOOLED YOU! above those two bullets the docs say: o If the pattern ends with a slash, it is removed for the purpose of the following description, ... Change all the patterns to use a leading slash for "rooted" behavior. This bit me earlier today because I had a perfectly reasonable source code directory go/src/cmd/go/testdata/src/empty/pkg that was not added by 'git add empty'. Change-Id: I6f8685b3c5be22029c33de9ccd735487089a1c03 Reviewed-on: https://go-review.googlesource.com/34832 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/runtime2.go')
0 files changed, 0 insertions, 0 deletions