On Sun, Feb 14, 2021 at 11:10:57AM +0100, René Scharfe. wrote: > Allow restricting the tags used by the placeholder %(describe) with the > options match and exclude. E.g. the following command describes the > current commit using official version tags, without those for release > candidates: > > $ git log -1 --format='%(describe:match=v[0-9]*,exclude=*rc*)' An interesting side effect of this series is that it allows remote users asking for archives to fill in this data, too (by using export-subst placeholders). That includes servers allowing "git archive --remote", but also services like GitHub that will run git-archive on behalf of clients. I wonder what avenues for mischief this provides. Certainly using extra CPU to run git-describe. But I guess also probing at otherwise hidden refs using the match/exclude system (though since it's limited to refs/tags/, that's pretty unlikely). I present this mostly as an observation, not an objection. Certainly we already have %D which can look at hidden refs. And I strongly suspect that the server-side git-upload-archive does not respect hidden refs when resolving object names in the first place. Kind of an interesting thought as we extend the formatting language, though. I generally think of them as something that is always under control of caller, but export-subst's $Format$ will come from the repo contents. -Peff