Click here to Skip to main content
15,884,388 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Only if it was so simple! Pin
W Balboos, GHB16-Oct-20 1:36
W Balboos, GHB16-Oct-20 1:36 
GeneralRe: Only if it was so simple! Pin
Sandeep Mewara15-Oct-20 6:39
mveSandeep Mewara15-Oct-20 6:39 
GeneralRe: Only if it was so simple! Pin
Nelek15-Oct-20 10:06
protectorNelek15-Oct-20 10:06 
GeneralRe: Only if it was so simple! Pin
  Forogar  15-Oct-20 7:17
professional  Forogar  15-Oct-20 7:17 
GeneralRe: Only if it was so simple! Pin
rnbergren15-Oct-20 8:00
rnbergren15-Oct-20 8:00 
GeneralRe: Only if it was so simple! Pin
trønderen15-Oct-20 23:15
trønderen15-Oct-20 23:15 
GeneralRe: Only if it was so simple! Pin
Richard Deeming15-Oct-20 21:55
mveRichard Deeming15-Oct-20 21:55 
GeneralWindows Search in Windows 10 not indexing folders that have a .git subfolder Pin
markrlondon15-Oct-20 3:07
markrlondon15-Oct-20 3:07 
Yea, I know this isn't the place to ask technical questions about this annoying 'feature' but can anyone recommend a good place to ask and actually get a meaningful answer from someone who knows? It seems to be a bug or a 'misfeature'.

For those who are interested, here is the issue:-

This is Windows 10 2004 and I added a path to the Windows Search search scope. The path contains archived dev projects. Let's say it's "D:\Data\Devstuff\Archive\". It contains subfolders (40-50 folders, one subfolder per project). Mostly C# but Python, TypeScript and other stuff. Most of the folders do not have ".git" subfolders but a few do.

I recently noticed that all the folders that have a ".git" subfolder (e.g. like this: "D:\Data\Devstuff\Archive\PythonHelloWorld\.git\") have been excluded from the Windows search search scope. So "D:\Data\Devstuff\Archive\" is included but "D:\Data\Devstuff\Archive\PythonHelloWorld\" (and any other subfolder of "D:\Data\Devstuff\Archive\" that has a ".git" subfolder) is listed in the excluded section. It wasn't me who did this; Windows did it all by itself at some point fairly recently! Not sure when, though.

After some experimentation:
(1) It's definitely the existence of a .git subfolder that causes its immediate parent folder to be excluded from the search/index scope.
(2) The ".vs" subfolder has no such effect.
(3) It's not a path length issue. The same thing happens no matter how deep the offending folder is.
(4) Manually removing the exclusions simply results in them being added back in by Windows.
(5) Rebuilding Windows Search (forcing a complete rebuild of its database and settings) from scratch doesn't cure the problem.
(6) I tried adding an exclusion rule via the registry to exclude "file:///*\.git\" (i.e. all ".git" folders) in the hope that this would allow the parent folder to be indexed but it had no effect. The parent folder was still removed from the search scope.
(7) By fiddling around with the registry to manually force folders with ".git" subfolders to be included, it is possible to hang the Windows Search service. The only cure is to allow Windows Search to remove the folders containing ".git" subfolders (usually be letting it rebuild from scratch).

On the face of it this seems to be a strangely hardcoded attempt to prevent ".git" folders being needlessly indexed but it seems to have gone awry in that it excludes the parent folders that simply contain the ".git" subfolders (and of course it then excludes any other subfolders, including the ones containing code that I want to be indexed).

Any ideas?

modified 15-Oct-20 9:41am.

GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
markrlondon15-Oct-20 3:24
markrlondon15-Oct-20 3:24 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
markrlondon15-Oct-20 3:31
markrlondon15-Oct-20 3:31 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
GenJerDan15-Oct-20 4:45
GenJerDan15-Oct-20 4:45 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
markrlondon15-Oct-20 5:02
markrlondon15-Oct-20 5:02 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
markrlondon15-Oct-20 5:13
markrlondon15-Oct-20 5:13 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
trønderen15-Oct-20 4:50
trønderen15-Oct-20 4:50 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
markrlondon15-Oct-20 5:10
markrlondon15-Oct-20 5:10 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
dandy7215-Oct-20 5:49
dandy7215-Oct-20 5:49 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
GuyThiebaut15-Oct-20 7:02
professionalGuyThiebaut15-Oct-20 7:02 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
dandy7215-Oct-20 7:09
dandy7215-Oct-20 7:09 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
markrlondon16-Oct-20 7:23
markrlondon16-Oct-20 7:23 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
thewazz16-Oct-20 10:39
professionalthewazz16-Oct-20 10:39 
AnswerRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
Tom_and_Frank15-Oct-20 7:37
Tom_and_Frank15-Oct-20 7:37 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
markrlondon16-Oct-20 7:24
markrlondon16-Oct-20 7:24 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
Tom_and_Frank16-Oct-20 10:22
Tom_and_Frank16-Oct-20 10:22 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
markrlondon17-Oct-20 1:10
markrlondon17-Oct-20 1:10 
GeneralRe: Windows Search in Windows 10 not indexing folders that have a .git subfolder Pin
Kent Sharkey15-Oct-20 11:32
staffKent Sharkey15-Oct-20 11:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.