Skip to content

Conversation

@tigt
Copy link

@tigt tigt commented Jul 31, 2019

If a .gitignore file has comment lines, browser-refresh will announce them as patterns, like so:

$ browser-refresh index.js
[browser-refresh] Watching: /Users/me/git/project
[browser-refresh] Ignore rule: #### MacOS ####
[browser-refresh] Ignore rule: .DS_Store
[browser-refresh] Ignore rule: .AppleDouble
[browser-refresh] Ignore rule: .LSOverride
[browser-refresh] Ignore rule: # Icon must end with two \r
[browser-refresh] Ignore rule: Icon
[browser-refresh] Ignore rule: # Thumbnails
[browser-refresh] Ignore rule: ._*
[browser-refresh] Ignore rule: #### Node.JS ####

I’m unsure this is the place to filter them out, though — technically a filename can start with the gitconfig comment characters (# and ;). I couldn’t find the code that parses out patterns from .gitignore, but if you show me where I’ll filter there instead!

If a `.gitignore` file has comment lines, `browser-refresh` will announce them as patterns, like so:

```sh
$ browser-refresh index.js
[browser-refresh] Watching: /Users/me/git/project
[browser-refresh] Ignore rule: #### MacOS ####
[browser-refresh] Ignore rule: .DS_Store
[browser-refresh] Ignore rule: .AppleDouble
[browser-refresh] Ignore rule: .LSOverride
[browser-refresh] Ignore rule: # Icon must end with two \r
[browser-refresh] Ignore rule: Icon
[browser-refresh] Ignore rule: # Thumbnails
[browser-refresh] Ignore rule: ._*
[browser-refresh] Ignore rule: #### Node.JS ####
```

I’m unsure this is the place to filter them out, though — _technically_ a filename can start with the gitconfig comment characters (`#` and `;`). I couldn’t find the code that parses out patterns from `.gitignore`, but if you show me where I’ll filter there instead!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant