Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to ignore git submodules #31

Closed
d3zd3z opened this issue Apr 15, 2019 · 6 comments
Closed

Add ability to ignore git submodules #31

d3zd3z opened this issue Apr 15, 2019 · 6 comments

Comments

@d3zd3z
Copy link

d3zd3z commented Apr 15, 2019

Some projects pull in other large subprojects as submodules (think of LLVM in the Rust compiler source). This can dwarf the statistics, making them less useful.

This could either be added as a feature to tokei, or use the output of a git submodule command to generate a list of exclusions to give to it.

@o2sh
Copy link
Owner

o2sh commented Jun 23, 2019

Sorry for the late answer.
I'm not sure I see the issue, tokei (therefore onefetch) is already ignoring everything that is listed in your .gitignore file.

What I can do is add an exclude flag (like in tokei) where the user can specify some files or folder to exclude which are not referenced in the .gitignore...

Would that solve the issue?

@spenserblack
Copy link
Collaborator

spenserblack commented Oct 1, 2019

If the tokei dependency is updated to version 10.0, you should be able to add a .tokeignore file (see tokei's CHANGELOG.md). Whatever tokei ignores via this file, onefetch would ignore. That might resolve this issue.
I can make a PR for this if you want.

@o2sh
Copy link
Owner

o2sh commented Oct 3, 2019

Thanks for the info @spenserblack

Plz do the PR 🥇

Would that solve your issue @d3zd3z ?

@d3zd3z
Copy link
Author

d3zd3z commented Oct 23, 2019

I "solves" the issue in that it provides another way to work around it. But it is at least more meaningful as a Tokei-specific file.

@marcelarie
Copy link

Awesome it can use .tokeignore!!

In any case there should be a flag to ignore the submodules, --ignore-submodules.

@spenserblack
Copy link
Collaborator

spenserblack commented Oct 10, 2024

A PR that I'm working on (#1305) will actually have the side-effect of ignoring submodules by default.

Looking at scc, I'm starting to think that's a reasonable default, and a --recurse-submodules flag can be added if there's demand.

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

No branches or pull requests

4 participants