# ls-files -o -i --directory omits files/directories

1 messages from 2020-04-20 to 2020-04-20. Participants: Jakub Horodecki.
Thread: https://gitlist.dev/t/53258

## Jakub Horodecki, 2020-04-20 08:03

Subject: ls-files -o -i --directory omits files/directories
Message-ID: <CAGdVfV2JhBp1_3iBWg_3gm5zDPwGizQxiK5QXJSRbDkN4Si4Lw@mail.gmail.com>
URL: https://gitlist.dev/e/CAGdVfV2JhBp1_3iBWg_3gm5zDPwGizQxiK5QXJSRbDkN4Si4Lw%40mail.gmail.com

```
Hello

I found a case for git ls-files I suspect might be a bug. For the
following example repository structure:

.
|--   InnerDir
|     |--   excluded.txt
|--   file1.txt
|--   .gitignore

and the .gitignore content:
InnerDir/*

the command

git ls-files -oi --exclude-standard --directory

returns no results, that is neither "InnerDir/" directory nor
"InnerDir/excluded.txt" file. I would expect one of the entries since
at the moment information about the file is missing completely in the
listing. Both executing the command without --directory flag and
adding "InnerDir" to .gitignore produce some output from the command.

So the command returns no results for --others excluded files if
--directory flag is specified and all files in a directory are ignored
(but directory itself is not). Is this actually a bug or I
misunderstood something?

I tested it on latest release of Git for Windows (2.26.1.windows.1, x64).

Best Regards
Jakub Horodecki

```
