Ticket #2275 (new enhancement) — at Version 4

Opened 10 years ago

Last modified 9 years ago

Find file: ignore_dir should allow to specify relative, not only absolute paths

Reported by: ossi Owned by:
Priority: minor Milestone: 4.8.0-pre1
Component: mc-core Version: master
Keywords: Cc: zaytsev, gotar@…
Blocked By: Blocking:
Branch state: Votes for changeset:

Description (last modified by zaytsev) (diff)

Most of the time there is no point in searching through the repository data of the version control systems.

To this end, ignore_dirs should allow to specify relative directory names, such as ".svn" in the mc.ini file.

This patch is somewhat crude - the list should be probably come from a config file. the list isn't complete, either - it covers only the VCS i'm using.

One might consider adding a checkbox (like the "skip hidden") to the actual search dialog, but i think this is pretty much pointless and thus not worth the ui clutter.

Change History

comment:1 Changed 10 years ago by andrew_b

We already nave ignore_dirs variable in config file. This variable should be used instead of hardcoded direcory names.

comment:2 Changed 10 years ago by zaytsev

  • Cc zaytsev added

Very bad idea.

One thing that I do quite often is to mass-move or remove directories that I find via the Find file dialog. This might be .idea folders, .svn junk or whatever it is in every specific case. You just search for them, then hit Panelize and remove them all, or move to some other location.

Now this undocumented change will break part of my searches without me having a clue on why did this happen if I wouldn't have stumbled upon this ticket.

Use ignore_dirs and Skip hidden, it's documented in the man page.

comment:3 Changed 10 years ago by ossi

the doc of ignore_dirs suggests that it specifies only absolute paths. if it is so, it is completely useless for my purposes - you know how many .svn directories a big checkout has, right? otherwise, the doc needs adjustment.

regarding zaytsev's use case ... the patch does in fact do too much. it wasn't supposed to prevent finding those directories, only to prevent descending into them. as i wrote, it is somewhat crude ...

comment:4 Changed 10 years ago by zaytsev

  • Description modified (diff)
  • Summary changed from search: skip working copy meta data of known version control systems to Find file: ignore_dir should allow to specify relative, not only absolute paths

It is true that ignore_dirs does not allow to specify relative paths. Well, it kinda does, but this will break on recursive searches. Let us re-purpose this ticket to enhance the existing setting.

Note: See TracTickets for help on using tickets.