Having trouble filtering "all except"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sferrari63
    Journeyman
    • Oct 2013
    • 16

    Having trouble filtering "all except"

    I'd like to exclude everything in the .git folder, except:

    - The file "HEAD"
    - The folders "logs" and "refs"

    Unfortunately I can't find the right combination. It seems that the exclusion list is processed after the inclusion list, so if I exclude .\.git\*, adding something like .\.git\HEAD to the inclusion list doesn't help. I also tried adding .\.git to the folder exclusion list and specifying .\.git\HEAD to the file inclusion list, but no luck.

    What's the right combination to get what I want?

    Thanks,
    Stephen
  • Aaron
    Team Scooter
    • Oct 2007
    • 16000

    #2
    Hello,

    This type of exclusion can be tricky to setup. The issue is that an Include filter only works if all parent items are also included. If any of them are excluded, then the Include does not take priority.

    Once an Include is configured, it would exclude everything else. First, setup a filter which only includes these two files. Then, would it work to create another filter which includes the items at the base level, and any subdirectories? Build up the Include list to cover general cases that don't include the .git items.

    .\.git\HEAD;.\.git\logs\...\*.*;.\.git\refs\...\*. *;.\*.*;.\subdirectory\...\*.*
    Aaron P Scooter Software

    Comment

    Working...