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>
This commit is contained in:

committed by
Junio C Hamano

parent
7743fcca5b
commit
01f95825d5
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user