]> git.ipfire.org Git - thirdparty/git.git/commit - dir.c
dir: revert work-around for retired dangerous behavior
authorEric Sunshine <sunshine@sunshineco.com>
Tue, 17 Sep 2013 07:06:17 +0000 (03:06 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Sep 2013 17:08:27 +0000 (10:08 -0700)
commitde372b1b46d91ffdcd6eb6e324cb8b586c99c539
treecc5537b3d019eae8856d7f5852e3b637ebd624ab
parentd28eec267374c476de490bff736a627da94575c5
dir: revert work-around for retired dangerous behavior

directory_exists_in_index_icase() dangerously assumed that it could
access one character beyond the end of its directory argument, and that
that character would unconditionally be '/'.  2eac2a4c (ls-files -k: a
directory only can be killed if the index has a non-directory,
2013-08-15) added a caller which did not respect this undocumented
assumption, and 680be044 (dir.c::test_one_path(): work around
directory_exists_in_index_icase() breakage, 2013-08-23) added a
work-around which temporarily appends a '/' before invoking
directory_exists_in_index_icase().

Since the dangerous behavior of directory_exists_in_index_icase() has
been eliminated, the work-around is now redundant, so retire it (but not
the tests added by the same commit).

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c