diff options
Diffstat (limited to 'src/describe.c')
| -rw-r--r-- | src/describe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/describe.c b/src/describe.c index 7f715193d..42e5848c2 100644 --- a/src/describe.c +++ b/src/describe.c @@ -16,10 +16,11 @@ #include "commit_list.h" #include "oidmap.h" #include "refs.h" +#include "repository.h" #include "revwalk.h" #include "tag.h" #include "vector.h" -#include "repository.h" +#include "wildmatch.h" /* Ported from https://github.com/git/git/blob/89dde7882f71f846ccd0359756d27bebc31108de/builtin/describe.c */ @@ -214,7 +215,7 @@ static int get_name(const char *refname, void *payload) return 0; /* Accept only tags that match the pattern, if given */ - if (data->opts->pattern && (!is_tag || p_fnmatch(data->opts->pattern, + if (data->opts->pattern && (!is_tag || wildmatch(data->opts->pattern, refname + strlen(GIT_REFS_TAGS_DIR), 0))) return 0; |
