grive2 icon indicating copy to clipboard operation
grive2 copied to clipboard

Fix include patterns in .griveignore

Open callegar opened this issue 7 years ago • 2 comments

Hi, this is an attempt at fixing include patterns in .griveignore following the discussion in bug #208.

Basically, the patch assures that include patterns are converted into lookahead patterns terminated by $ in the regular expression used to sift the filenames.

In this way if you have an include pattern (e.g., database), this only matches database rather than database and anything below it (as it is currently and incorrectly the case).

If you want to include database and anything below, then you should have !database** in your .griveignore.

The patch also assures that the regular expression is printed when one asks for a verbose output, so that some debugging is possible.

callegar avatar Nov 09 '18 17:11 callegar

Why it's not merged yet?(

segatrade avatar Jun 02 '22 05:06 segatrade

Are you sure that negated gitignore patterns should not affect directories?

For example when I run

git init .
mkdir database
touch database/a
echo database >> .gitignore
echo '!database' >> .gitignore
git status

git status shows me database/ as an untracked directory rather than ignored. It doesn't require database**

vitalif avatar Jun 03 '22 12:06 vitalif