dir: consolidate treat_path() and treat_one_path()
authorElijah Newren <redacted>
Wed, 1 Apr 2020 04:17:38 +0000 (04:17 +0000)
committerJunio C Hamano <redacted>
Wed, 1 Apr 2020 18:10:38 +0000 (11:10 -0700)
commitcd129eed986588907d1f1bd7d478a8d4f6d1dc1c
treed2b9c1f308482ede64b42a0a412de1041b752b5d
parent446f46d8c7ea3b91f7afe4c5a46b5cd20cc40196
dir: consolidate treat_path() and treat_one_path()

Commit 16e2cfa90993 ("read_directory(): further split treat_path()",
2010-01-08) split treat_one_path() out of treat_path(), because
treat_leading_path() would not have access to a dirent but wanted to
re-use as much of treat_path() as possible.  Not re-using all of
treat_path() caused other bugs, as noted in commit b9670c1f5e6b ("dir:
fix checks on common prefix directory", 2019-12-19).  Finally, in commit
ad6f2157f951 ("dir: restructure in a way to avoid passing around a
struct dirent", 2020-01-16), dirents were removed from treat_path() and
other functions entirely.

Since the only reason for splitting these functions was the lack of a
dirent -- which no longer applies to either function -- and since the
split caused problems in the past resulting in us not using
treat_one_path() separately anymore, just undo the split.

Signed-off-by: Elijah Newren <redacted>
Signed-off-by: Junio C Hamano <redacted>
dir.c
git clone https://git.99rst.org/PROJECT