Any idea on this design choice? when I ask to list ignored files, and some
are not listed, then it feels like bug. Or in this case a bad design
decision.

Jeroen


On Mon, Mar 25, 2013 at 2:02 PM, Thomas Ferris Nicolaisen
<tfn...@gmail.com>wrote:

> On Monday, March 25, 2013 11:43:21 AM UTC+1, Jeroen De Vlieger wrote:
>
>> lets create a new git repo
>>
>> $ mkdir testRepo
>> $ cd testRepo
>> $ mkdir dirWithOnlyIgnoredFiles
>> $ touch dirWithOnlyIgnoredFiles/foo.**log
>> $ touch test.txt
>> $ touch main.log
>> $ git init
>>
>> now lets ignore the log files
>>
>> $ echo '*.log' > .gitignore
>>
>> stage all non-ignored files and creat a commit
>>
>> $ git add .
>> $ git commit -m 'foo'
>>
>> now lets list the ignore files
>>
>> $ git status --ignored
>> # On branch master
>> # Ignored files:
>> #   (use "git add -f <file>..." to include in what will be committed)
>> #
>> # main.log
>> nothing to commit (working directory clean)
>>
>> Note the the log file in the 'dirWithOnlyIgnoredFiles' is *not* listed,
>> although I would presume that it is indeed an ignored file.
>> What happened here?
>>
>>
> Git ignores empty directories (by design). A directory with only ignored
> files is also counted as being empty. Hence, when you add a non-ignored
> file inside the directory, the directory gets noticed.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Git for human beings" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/git-users/VS-1YqpIfPk/unsubscribe?hl=en-US
> .
> To unsubscribe from this group and all its topics, send an email to
> git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to