Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

@nathansobo
Copy link
Contributor

@nathansobo nathansobo commented Jun 3, 2019

🍐'd with @as-cii

After the upgrade of libgit2 in #91, .gitignore patterns such as **.log only match relative paths that start with ./. We call relativize in Atom before asking whether a path is ignored, but prior to this PR, the relative paths returned by this method do not include a ./ prefix, leading to an incorrect displaying of ignored status in the tree view in atom/tree-view#1317.

This PR changes the relativize method to include the ./ prefix, and we also add a regression test for atom/tree-view#1317.

Nathan Sobo and others added 2 commits June 3, 2019 13:58
When passing the path to a file that is ignored via a pattern like 
`**.log`, libgit2 only recognizes the path as ignored if it starts with 
`./`. So we change the `relativize` method to include a leading `./` so 
that these kind of patterns work correctly on relativized paths.

Co-Authored-By: Antonio Scandurra <as-cii@github.com>
@nathansobo nathansobo merged commit e46f3ee into master Jun 3, 2019
@nathansobo nathansobo deleted the as-ns/fix-relativize branch June 3, 2019 20:31
nathansobo pushed a commit that referenced this pull request Jun 3, 2019
This reverts commit e46f3ee, reversing
changes made to 1c9311b.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants