pathspec: create parse_element_magic helper
commit1b6112c527be607f56a674301b413af16aa186c6
authorBrandon Williams <bmwill@google.com>
Wed, 4 Jan 2017 18:04:08 +0000 (4 10:04 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2017 02:04:18 +0000 (8 18:04 -0800)
tree001be6b42d68b64f46cd6bfee50270edce50815d
parent8881fde01340e1fff4a3acc17805886b644d18d8
pathspec: create parse_element_magic helper

Factor out the logic responsible for the magic in a pathspec element
into its own function.

Also avoid calling into the parsing functions when
`PATHSPEC_LITERAL_PATH` is specified since it causes magic to be
ignored and all paths to be treated as literals.

Signed-off-by: Brandon Williams <bmwill@google.com>
Reviewed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pathspec.c