describe: teach --match to handle branches and remotes
commit6d68b2ab78cb670dd474dd61b1b2ec0a407cb9b8
authorMax Kirillov <max@max630.net>
Wed, 20 Sep 2017 01:10:10 +0000 (20 04:10 +0300)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Sep 2017 04:30:10 +0000 (20 13:30 +0900)
tree767e2c981f2f7fdef73c53eec910c53a3cad103a
parent3445c3dd723b222d5ceda07b13d092d73428012e
describe: teach --match to handle branches and remotes

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 add tests.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-describe.txt
builtin/describe.c
t/t6120-describe.sh