.gitkeep's color in tree view


#1

As you know, Atom displays file names in different color according to their Git status. This is very useful. I’ve encountered a strange behavior, though.

Let me take an example.

test/
├─tmp/
| └.gitkeep
└─.gitignore

If the .gitignore is

tmp/*
!.gitkeep

tree view would look like

and if the .gitignore is

tmp/*
!tmp/.gitkeep

tree view would look like

I like the former .gitignore and the latter tree view coloring. How can I make both of them come true at the same time and why these two .gitignores make different tree views?

I suppose the .gitignores should result in the same appearance because the command git ls-files returns the same answer in both cases, but feel free to tell me if I have some misunderstandings about Git.

$ git ls-files
.gitignore
tmp/.gitkeep

Note that I use OS X Yosemite 10.10.5 and Atom 1.1.0.


#2

This is a great bug write up :grinning: Would you mind filing it on the Tree View at https://github.com/atom/tree-view/issues? If you do, please post a link to the issue here on the topic so others who find this topic can subscribe easily.


#3

Of course, I will when I had spare time a few hours later. I found that the same problem also occurs on tabs. Where should I make an issue, at atom/tree-view, atom/tabs or both?


#4

It’s probably the same root cause, perhaps in the libgit2 library. I would just create the one in tree-view (since you already have the repro images there) and mention that it affects tabs also.


#5

I tried to post an issue there, and noticed that a similar issue (possibly a duplicate) is already made. So I myself didn’t.

As the original opener says, tree view can handle .gitkeep in the project root properly. The command touch /path/to/test/.gitkeep shows

P.S. I added a link to this thread in the existing issue. If I should provide a specific description there, not just a link, don’t hesitate to tell me and I’ll edit the comment ASAP.


#6

Bumping because the issue still exists. I’ve tracked down some more information and included it with the issue from above.