diff options
author | Karthik Nayak <karthik.188@gmail.com> | 2017-01-10 11:49:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-10 23:44:31 +0300 |
commit | 01f95825d55b2ca36ee9bc131a5f6899f47621c6 (patch) | |
tree | ea7167ef1ca423a65502e24931b9fd33bc523e26 /ref-filter.c | |
parent | 7743fcca5be6854a1b9a5a0f7e60b79c15fee4b9 (diff) |
ref-filter: make "%(symref)" atom work with the ':short' modifier
The "%(symref)" atom doesn't work when used with the ':short' modifier
because we strictly match only 'symref' for setting the 'need_symref'
indicator. Fix this by comparing with the valid_atom rather than the
used_atom.
Add tests for %(symref) and %(symref:short) while we're here.
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Karthik Nayak <Karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.c')
-rw-r--r-- | ref-filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ref-filter.c b/ref-filter.c index c58765fa7f..26116b805e 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -352,7 +352,7 @@ int parse_ref_filter_atom(const char *atom, const char *ep) valid_atom[i].parser(&used_atom[at], arg); if (*atom == '*') need_tagged = 1; - if (!strcmp(used_atom[at].name, "symref")) + if (!strcmp(valid_atom[i].name, "symref")) need_symref = 1; return at; } |