foundweekends / foundweekends/giter8

.gitignore handling fails if .gitignore contains "var"

Open
#329 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
1.8k
Forks
225
Avg merge
2h 35m
Merged PRs (30d)
8

Description

I have a g8 template with a .gitignore that includes the line `var/`. It turns out that if `var` is present anywhere in .gitignore, the template fails.

Here's a repro using a [test template I made](https://github.com/mattolenik/g8-bug.g8):
```
$ g8 https://github.com/mattolenik/g8-bug.g8 --name=test
Ignoring unrecognized parameter: name

Template applied in /Users/mattolenik/dev/g8bug/.
```

Here it is again, without specifying the name parameter:
```
g8 https://github.com/mattolenik/g8-bug.g8

Template applied in /Users/mattolenik/dev/g8bug/.
```

Notice that in both instances the template gets applied to `./` instead of `./test` as would normally happen. If you remove the `var` line from the .gitignore, it works fine. Setting `verbatim=.gitignore` makes no difference. Other verbatim files work just fine. I haven't tested against other .*ignore files but if they're built with shared code they may broken, too.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.