<p dir="auto">Consider this .gitignore:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/lib/*
!/lib/foo/"><pre class="notranslate"><code class="notranslate">/lib/*
!/lib/foo/
</code></pre></div>
<p dir="auto">Here, we are instructing git to ignore everything under /lib, except for things under /lib/foo. However, tree-view does not parse this correctly, and instead matches everything under /lib, regardless of whether it's under /lib/foo or not. Thus, if I have "Hide VCS Ignored Files" unchecked, everything under /lib and lib/foo will be ghosted out. If I have "Hide CVS Ignored Files" check, everything under /lib and /lib/foo will be hidden. It appears that it's using the first rule that matches, and not the most-specific rule that matches.</p>
<p dir="auto">Let's say I add the following rules to my <code class="notranslate">.gitignore</code> to ignore everything in the root except the <code class="notranslate">wp-content</code> directory:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/*
!.gitignore
!wp-content/"><pre class="notranslate"><code class="notranslate">/*
!.gitignore
!wp-content/
</code></pre></div>
<p dir="auto">So far this works correctly (only <code class="notranslate">.gitignore</code> and <code class="notranslate">wp-content/</code> are shown in the tree view). Now I add the following rules to ignore everything in the <code class="notranslate">wp-content</code> directory, except the <code class="notranslate">plugins</code> and <code class="notranslate">themes</code> directories</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="wp-content/*
!wp-content/plugins/
!wp-content/themes/"><pre class="notranslate"><code class="notranslate">wp-content/*
!wp-content/plugins/
!wp-content/themes/
</code></pre></div>
<p dir="auto">Before Atom 0.116.0, the plugins and themes directories were shown correctly in the tree view, but now the <code class="notranslate">wp-content</code> directory disappears completely. My machine's git (v2.0.0) parses the .gitignore correctly and sees changes in <code class="notranslate">plugins</code> and <code class="notranslate">themes</code>.</p>
<p dir="auto">I see that 0.116.0 moved to libgit2 0.21.0. If this is what's causing this behavior I'll open an issue with them.</p>