Is there a way to ignore certain folders in ALL searches?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
ThiefMaster
Junior Member
Junior Member
Posts: 79
Joined: 2003-10-27, 16:49 UTC
Contact:

Is there a way to ignore certain folders in ALL searches?

Post by *ThiefMaster »

As a developer I have quite a few .git (or .svn) folders with lots of stuff in there - lots of stuff that I NEVER want to search (with all the small files it takes ages to search, especially when searching file contents and if it's on a network drive). Is there any way to make TC ignore that folder in all searches without specifying it manually all the time?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Add .git and .svn to TC ignore list, it will hide all such dirs from panels and ignore in search/copy.
ThiefMaster
Junior Member
Junior Member
Posts: 79
Joined: 2003-10-27, 16:49 UTC
Contact:

Post by *ThiefMaster »

thanks - although it would be nice to still *see* the folder in the directory listing
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, edit its security permissions (Properties, Security tab) and forbid enumerating folder contents. It will be possible to open files via full path but it won't be possible to see folder contents.
ThiefMaster
Junior Member
Junior Member
Posts: 79
Joined: 2003-10-27, 16:49 UTC
Contact:

Post by *ThiefMaster »

That's a rather ugly thing. First of all, it's on a samba share. Second, I don't want to block access to it.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7025
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Is there a way to ignore certain folders in ALL searches

Post by *Horst.Epp »

ThiefMaster wrote:As a developer I have quite a few .git (or .svn) folders with lots of stuff in there - lots of stuff that I NEVER want to search (with all the small files it takes ages to search, especially when searching file contents and if it's on a network drive). Is there any way to make TC ignore that folder in all searches without specifying it manually all the time?
Store your search parameters and load that search with a button.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

There is no other way to prevent TC from looking into specific dir in all searches. I simply ignore .git, bin (with full path) and other folders I don't want TC to search in, and temporary disable ignore list (or use cd command) if I need to enter ignored dir.
User avatar
ado
Senior Member
Senior Member
Posts: 445
Joined: 2003-02-18, 13:22 UTC
Location: Slovakia, Pezinok

Post by *ado »

this is what I am doing to avoid search through .svn
1. In Alt-F7 search: going to the 3rd line (1st is .., 2nd .svn) and press Ctrl+Shift+End - it will select everything except .svn and then press Alt-F7 - it will search only selected dirs/files. Of course - it works, because SVN I am using has one .svn dir only - in the root of the project (previous version have it in each subdir) and my default sorting puts .svn to that 2nd row
2. "Synchronize dirs" - I have filter that I am always using from history - something like *.*|*.class .svn\ tmp\ ......

If you are "keyboard guy", you can create simple macro using AHK that will append that "|.svn\" into your search expression. It would require you to use keyboard to execute search instead of that button

ado
sky66
Member
Member
Posts: 176
Joined: 2014-02-22, 08:44 UTC

Post by *sky66 »

1. Alt+F7 Search...
2. Search for: (enter the search mask for the files you want to find)
3. Switch to Plugins tab, and make sure [V]Search in plugins
4. Plugin: select "tc" (default)
5. Property: select "path"
6. OP: select "!contains"
7. Value: enter .git (you can also add More rules for .svn)
8. Start search
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Or even better:
8. Save search template and then open search dialog using command LOADSEARCH search_template_name.

BTW I don't understand why it may be useful to see .svn or .git in listing, there is nothing user-friendly in such folders.
ThiefMaster
Junior Member
Junior Member
Posts: 79
Joined: 2003-10-27, 16:49 UTC
Contact:

Post by *ThiefMaster »

BTW I don't understand why it may be useful to see .svn or .git in listing, there is nothing user-friendly in such folders.
The fact that they do/don't exist, also `.git/config` is a plaintext file that can be easily edited manually.[/quote]
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can always enter such folder using cd .git in TC command line (I doubt that you need it every day).

Also, don't you know all your repositories' folders on your PC? If you have TortoiseGit/TortoiseSVN installed, you see overlay icon over folder icon and inside so it is obvious that it is a repository and you don't need any .git/.svn folders.
ThiefMaster
Junior Member
Junior Member
Posts: 79
Joined: 2003-10-27, 16:49 UTC
Contact:

Post by *ThiefMaster »

I'm not accessing any repos from windows (remote system, mounted via SMB) - at least for git the commandline client is *much* better than any GUI client.

Anyway, I'm using the ignore feature for now. I do know where my repos are after all - at least those I use frequently.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Even if you are a fan of command line git, it is quite useful to see statuses of all repository files in small overlay icons (non-versioned, added, modified, ignored) anyway.
Post Reply