Skip to content

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

@salewski

Description

@salewski

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:ideaIdeas for enhancements or better ways of doing things

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions