jmurzy / codesearch

Automatically exported from code.google.com/p/codesearch
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

cindex indexes vcs directories: .hg, .svn, .git, .bzr, ... #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run cindex on a directory containing a checkout
2. Run csearch on a text string known to be in the source code

What is the expected output? What do you see instead?
Expected output is source code matches.  Instead, I see source code matches 
_and_ .svn/.../foo.svn-base matches, or .hg/blah matches, or .git/blah matches.

What version of the product are you using? On what operating system?
f9a003c603e3 tip
Darwin 10.8.0

Please provide any additional information below.
A simple patch to the filewalker function can skip directories if they are 
known to be "special" and not likely to contain items we want to index.  I've 
included a small patch to cindex.go which does just this.

This functionality could also be disabled unless -ignore-vcs or something is 
passed.

Ack (betterthangrep.com) does similar filtering on directories and files: 
#foo.c# from emacs, foo.c~ from vim, etc.  Ignoring those would also be easy to 
add.

Original issue reported on code.google.com by dgryski on 19 Jan 2012 at 9:00

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks.  I'll make a more general change, namely ignoring
all files or directories beginning with . ~ # or ending in ~.

Original comment by rsc@swtch.com on 20 Jan 2012 at 4:40

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 070ef10ab799.

Original comment by rsc@swtch.com on 20 Jan 2012 at 4:41

GoogleCodeExporter commented 9 years ago
Issue 3 has been merged into this issue.

Original comment by dgryski on 2 May 2012 at 8:46