dir: replace double pathspec matching with single in treat_directory()
commit7f45ab2dca04c5b76958843120c6bd6d3a033043
authorElijah Newren <newren@gmail.com>
Wed, 1 Apr 2020 04:17:44 +0000 (1 04:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Apr 2020 18:11:31 +0000 (1 11:11 -0700)
tree90d4ece9f9a2fbf862e734ebb8f5fd47531bc477
parent1684644489fbd76d01fe3bb53c65df6856fd00c5
dir: replace double pathspec matching with single in treat_directory()

treat_directory() had a call to both do_match_pathspec() and
match_pathspec().  These calls have migrated through the code somewhat
since their introduction, but we don't actually need both.  Replace the
two calls with one, and while at it, move the check earlier in order to
reduce the need for callers of fill_directory() to do post-filtering of
results.

The next patch will address post-filtering more forcefully and provide
more relevant history and context.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c