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

ads-github-fetch-all-upstreams (new feature): allow user to specify repos to exclude (skip over) #32

Open
salewski opened this issue Dec 29, 2017 · 0 comments
Labels
type:idea Ideas for enhancements or better ways of doing things

Comments

@salewski
Copy link
Owner

salewski commented Dec 29, 2017

This issue pertains to ads-github-fetch-all-upstreams as included in ads-github-tools-0.2.0.

It is not uncommon that there is a problematic repo (or three) that you want the ads-github-fetch-all-upstreams tool to ignore (for whatever reason). The only way to accomplish that with the current version of the codebase (0.2.0) is to explicitly list on the command line the repos that you wish to operate on; this becomes cumbersome when dealing with a large number of repos, and more so when you are working with more repos than can be named on the command line (e.g., due to system exec*() (E2BIG)):

    $ xargs -0 -r ads-github-fetch-all-upstreams -vu < <(find -L . -maxdepth 1 -type d | while read -r dname; do test -d "${dname}/.git" && printf '%s\x00' "$(basename "${dname}")"; done | grep -v -z -Z -e repo1-to-ignore -e repo2-to-ignore | sort -z )

or, more perhaps more readably:

    $ xargs -0 -r ads-github-fetch-all-upstreams -vu < \
    > <(find -L . -maxdepth 1 -type d \
    >    | while read -r dname; do \
    >          test -d "${dname}/.git" && printf '%s\x00' "$(basename "${dname}")"; \
    >      done \
    >    | grep -v -z -Z -e 'repo1-to-ignore' -e 'repo2-to-ignore' \
    >    | sort -z )

It would be nice if there were one more more command line options to exclude certain repos (analogous to GNU grep's options --exclude=GLOB, --exclude-from=FILE, and --exclude-dir=GLOB). An improvement beyond that would be to also support an "ignore" file (possibly multiple), similar to the way .gitignore files work.

@salewski salewski added type:idea Ideas for enhancements or better ways of doing things and removed enhancement labels Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:idea Ideas for enhancements or better ways of doing things
Projects
None yet
Development

No branches or pull requests

1 participant