Bug 380893 - Provide an option to index source files
Summary: Provide an option to index source files
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_baloo (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-06 14:00 UTC by Matthias
Modified: 2021-02-16 15:09 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias 2017-06-06 14:00:11 UTC
There is currently no support for indexing Git Repos, as it seems?
Comment 1 Nate Graham 2017-10-27 16:49:55 UTC
.git indexes aren't indexed, but files inside git repos are indexed as normal.
Comment 2 Matthias 2017-10-28 09:24:58 UTC
So then, this is an issue for me. What can I provide to helpo with the tracking?
I already double check that with other users in the IRC.
Comment 3 Nate Graham 2017-10-28 21:53:33 UTC
I can see in src/file/fileexcludefilters.cpp that we do explicitly turn off indexing inside .git folders:

const char* const s_defaultFolderExcludeFilters[] = {
    "po",

    // VCS
    "CVS",
    ".svn",
    ".git",


And baloo also doesn't index source files themselves:

const char* const s_sourceCodeMimeTypes[] = {
    "text/css",
    "text/x-c++src",
    "text/x-c++hdr",
    "text/x-csrc",
    "text/x-chdr", // c header files
    "text/x-python",

But any other files in git repos should be indexed. So it's not so much that it's excluding git repos *per se*, but if you have a git repo that consists entirely of source files (no images or text files or anything), none of them are going to get indexed.

I gather from the existence of this bug report that you would like source files to be indexed, or for there to at least be an option? Shouldn't be too tough to add a setting to control this.

In the meantime, you can turn indexing on for source files by editing ~/.config/baloofilerc and removing whatever file types you want from the exclude filters= list
Comment 4 Stefan Brüns 2021-02-16 10:28:29 UTC
(In reply to Nate Graham from comment #3)
> In the meantime, you can turn indexing on for source files by editing
> ~/.config/baloofilerc and removing whatever file types you want from the
> exclude filters= list

Obviously, there is an option to index source files. Closing.
Comment 5 Nate Graham 2021-02-16 15:09:04 UTC
From a Baloo perspective, that's true. However there's no GUI for it, which is preventing people from knowing that it's an available option. Re-opening and moving to the component for the KCM, which is where such an option would need be be implemented.