author | Junio C Hamano <junkio@cox.net> | |
Sat, 7 Jan 2006 22:32:09 +0000 (14:32 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 8 Jan 2006 05:34:02 +0000 (21:34 -0800) | ||
commit | 657907e76e298cac31845dadda2c71b431d9e712 | |
tree | c9d89aa5f8a4c8cec98ac90ef749b3249529cbd8 | tree | snapshot |
parent | 9518eb262980d5048ef71e4450ef2cf78d7df6b5 | commit | diff |
ls-files --others --directory: fix a bug with index entry ordering
When both howto-index.sh and howto/make-dist.txt exist under
Documentation/ directory, dir_exists() mistakenly checked it
without the trailing slash to see if there was something under
Documentation/howto directory, and did not realize there was,
because '-' sorts earlier than '/' and cache_name_pos() finds
howto-index.sh, which is not under howto/ directory. This
caused --others --directory to show it which was incorrect.
Check the directory name with the trailing slash, because having
an entry that has such as a prefix is what we are looking for.
Signed-off-by: Junio C Hamano <junkio@cox.net>
When both howto-index.sh and howto/make-dist.txt exist under
Documentation/ directory, dir_exists() mistakenly checked it
without the trailing slash to see if there was something under
Documentation/howto directory, and did not realize there was,
because '-' sorts earlier than '/' and cache_name_pos() finds
howto-index.sh, which is not under howto/ directory. This
caused --others --directory to show it which was incorrect.
Check the directory name with the trailing slash, because having
an entry that has such as a prefix is what we are looking for.
Signed-off-by: Junio C Hamano <junkio@cox.net>
ls-files.c | diff | blob | history |