It has taken me a while to get back to this; the following series rebase and rework my proposed "!<pattern>" feature. The first patch extracts match_pattern() from builtin/tag.c and updates this to replace similar functions in builtin/{branch,for-each-ref,ls-remote}.c The second patch uses the OPT_CALLBACK wrapper on the recently added "--points-at" option of git-tag. I should have implemented it this way to begin with but I missed Jeff King's suggestion within that thread. The remaining patches add "--exclude <pattern>" options (vs. "!<pattern>") to: git-tag, git-branch, and git-for-each-ref. For example, $ git tag -l --exclude "*-rc?" "v1.7.8*" $ git branch -r --exclude \*HEAD $ git for-each-ref --format="%(refname)" --exclude "*HEAD" refs/remotes/origin Instead of, $ git tag -l "!*-rc?" "v1.7.8*" $ git branch -r "!*HEAD" $ git for-each-ref --format="%(refname)" "!*HEAD" refs/remotes/origin Note that I haven't yet added an "--exclude" feature to git-ls-remote because I think that I should first update its option parsing. Thanks, Tom Grennan (5): refs: add match_pattern() tag --points-at option wrapper tag --exclude option branch --exclude option for-each-ref --exclude option Documentation/git-branch.txt | 7 ++++- Documentation/git-for-each-ref.txt | 7 ++++- Documentation/git-tag.txt | 6 +++- builtin/branch.c | 30 ++++++++----------- builtin/for-each-ref.c | 27 +++++------------ builtin/ls-remote.c | 12 ++------ builtin/tag.c | 35 ++++++++++------------ refs.c | 36 +++++++++++++++++++++++ refs.h | 12 ++++++++ t/t3200-branch.sh | 23 +++++++++++++++ t/t6300-for-each-ref.sh | 11 +++++++ t/t7004-tag.sh | 56 ++++++++++++++++++++++++++++++++++++ 12 files changed, 195 insertions(+), 67 deletions(-) -- 1.7.8 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html