On Fri, Feb 10, 2012 at 01:34:26PM +0700, Nguyen Thai Ngoc Duy wrote: >On Fri, Feb 10, 2012 at 2:43 AM, Tom Grennan <tmgrennan@xxxxxxxxx> wrote: >> Please see the following patch which filters the tag list of "!" prefaced >> patterns. If this is deemed desirable and correct, I'll resubmit with updated >> documentation and unit tests. > >git-branch, git-tag and git-for-each-ref are in the same family. I >think it's good to that all three commands share things, like this >pattern matching. Yes, git-branch and git-tag could now use a common match_patterns() but git-for-each-ref needs some rearranging; as will: git-describe, git-replace, git-ls-remote, git-name-rev, and git-show-branch. If we pursue this, it may be best to first add match_patterns() to ./refs.[ch] then incrementally modify these builtin commands to use it. >About the '!' for exclusion, maybe it's better to move from fnmatch() >as matching machinery to pathspec. Then when git learns negative >pathspec [1], we have this feature for free. > >[1] http://thread.gmane.org/gmane.comp.version-control.git/189645/focus=190072 I have to study this more. I'm not sure that --exclude has precedence over matches. It also looks like this would require a lot more change to the above. Thanks, TomG -- 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