pathspec: create parse_element_magic helper
authorBrandon Williams <bmwill@google.com>
Wed, 4 Jan 2017 18:04:08 +0000 (10:04 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2017 02:04:18 +0000 (18:04 -0800)
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>
No differences found