Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Add option to use .gitignore as baseline for --exclude #9

Closed
kbknapp opened this issue Aug 23, 2015 · 0 comments
Closed

Add option to use .gitignore as baseline for --exclude #9

kbknapp opened this issue Aug 23, 2015 · 0 comments

Comments

@kbknapp
Copy link
Owner

kbknapp commented Aug 23, 2015

Similar to how cargo works. I want this to be a CLI option though, as there may be times where you want to count something that is on your .gitignore

homu added a commit that referenced this issue Dec 24, 2015
imp: Ignore files in accordance with .gitignore

I noticed discussion of this in issues #8 and #9.  Here's the approach I took:

  * By default `.gitignore`d paths are ignored.
  * A `-a` / `--all` flag returns the old behavior.
  * A single `.gitignore` file is looked for in the directory in which cargo count is called. No attempt is made to find additional `.gitignore` files in sub-directories.

I have a pull request open with the `gitignore` crate to reclassify `tempdir` as a dev dependency. If that patch gets merged, this patch should be able to be amended to not bring in any additional dependencies except `gitignore` itself.
@kbknapp kbknapp closed this as completed Dec 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant