From 5e5fe3be7683bb52a710cf873af9d10291143db9 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Tue, 22 Jan 2019 12:47:16 -0800 Subject: [PATCH] Rename seen to entries and use ASCII `in` --- src/generate.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/generate.jl b/src/generate.jl index c013be7..6de6dec 100644 --- a/src/generate.jl +++ b/src/generate.jl @@ -229,12 +229,12 @@ Returns an array of generated file/directory names. """ function gen_gitignore(pkg_dir::AbstractString, t::Template) pkg = basename(pkg_dir) - seen = mapfoldl(p -> p.gitignore, append!, values(t.plugins); init=[".DS_Store"]) - if !t.manifest && "Manifest.toml" ∉ seen - push!(seen, "/Manifest.toml") # Only ignore manifests at the repo root. + entries = mapfoldl(p -> p.gitignore, append!, values(t.plugins); init=[".DS_Store"]) + if !t.manifest && !in("Manifest.toml", entries) + push!(entries, "/Manifest.toml") # Only ignore manifests at the repo root. end - unique!(sort!(seen)) - text = join(seen, "\n") + unique!(sort!(entries)) + text = join(entries, "\n") gen_file(joinpath(pkg_dir, ".gitignore"), text) files = [".gitignore"]