On Wed, Oct 19, 2016 at 01:07:34PM -0400, Santiago Torres wrote: > > I guess that may complicate things for the caller you add in this > > series, which may not have a fully-qualified refname (which is obviously > > how filter_ref_kind() figures it out). I'd argue that is a bug, though, > > as things like "%(refname)" are generally expected to print out the > > fully refname ("git tag --format=%(refname)" does so, and you can use > > "%(refname:short)" if you want the shorter part). > > Hmm, I hadn't actually noticed that. Do you have any suggestions in how to > address this? > > In general this feels like a consequence of disambiguating .git/tags/* > within builtin/tag.c rather than letting ref-filter figure it out. The partial solution would look like something below. It's not too bad because git-tag always knows that it's working a ref in the refs/tags namespace (and we don't even have to qualify it ourselves, for_each_tag_name already does it for us). But verify-tag feeds arbitrary sha1 expressions. See the notes in the second patch. [1/2]: ref-filter: split ref_kind_from_filter [2/2]: tag: send fully qualified refnames to verify_tag_and_format builtin/tag.c | 2 +- ref-filter.c | 21 +++++++++++++-------- ref-filter.h | 6 +++++- tag.c | 2 +- 4 files changed, 20 insertions(+), 11 deletions(-) -Peff