foundweekends / foundweekends/giter8

Template generation ignores files that "vanilla" .gitignore doesn't

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

Description

Using the latest `giter8` from brew (0.10.0), some file patterns in `.gitignore` are ignored by `giter8` that wouldn't be ignored by `git`.

Here is an example:

#### Template structure:
```
> tree -a minimal.g8/

minimal.g8
└── src
└── main
└── g8
├── .gitignore
├── default.properties
└── src
└── main
└── resources
└── test.conf

6 directories, 3 files
```

#### `.gitignore` contents in scaffold:
```
**/resources/build.properties
```

#### Generated directory:
```
> g8 file://minimal.g8 --name=minimal
> tree -a minimal/

minimal/
└── .gitignore

0 directories, 1 file
```

Note that `src/main/resources/test.conf` is missing. We can verify that "normal" git would not ignore these files with `git check-ignore`:

```
✗ git check-ignore --verbose src/main/resources/test.conf
✗ git check-ignore --verbose src/main/resources/build.properties
.gitignore:1:**/resources/build.properties src/main/resources/build.properties
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with the minimal.g8 template and compare g8 output with git check-ignore for the shown patterns. Trace the template-generation path that processes .gitignore files. Done means generated files such as src/main/resources/test.conf are retained while files matching **/resources/build.properties remain ignored.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, scala
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.