Re: [PATCH] describe: teach --match to handle branches and remotes

2017-09-19 Thread Max Kirillov
On Tue, Sep 19, 2017 at 08:52:24AM +0900, Junio C Hamano wrote: > I think you can use skip_prefix() to avoid counting the length of > the prefix yourself, i.e. Thanks, will use it. > The hardcoded +10 for "is_tag" case assumes that anything other than > "refs/tags/something" would ever be used

Re: [PATCH] describe: teach --match to handle branches and remotes

2017-09-18 Thread Jacob Keller
On Mon, Sep 18, 2017 at 4:52 PM, Junio C Hamano wrote: > Max Kirillov writes: > >> --match :: >> Only consider tags matching the given `glob(7)` pattern, >> - excluding the "refs/tags/" prefix. This can be used to avoid >> - leaking private

Re: [PATCH] describe: teach --match to handle branches and remotes

2017-09-18 Thread Junio C Hamano
Max Kirillov writes: > --match :: > Only consider tags matching the given `glob(7)` pattern, > - excluding the "refs/tags/" prefix. This can be used to avoid > - leaking private tags from the repository. If given multiple times, a > - list of patterns will be

[PATCH] describe: teach --match to handle branches and remotes

2017-09-17 Thread Max Kirillov
When `git describe` uses `--match`, it matches only tags, basically ignoring the `--all` argument even when it is specified. Fix it by also matching branch name and $remote_name/$remote_branch_name, for remote-tracking references, with the specified patterns. Update documentation accordingly and