-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Find files in repo #15028
Feature: Find files in repo #15028
Conversation
Imho it will be quite performance killer for large repositories, imho filtering should be done server side using ui something like github |
Github doesn't filter server side. On pageload there is a JSON request which returns all files of the repository. I noticed that the |
It's probably the linguist attributes: Lines 2 to 3 in 54d7b0f
Not sure how far we are for Gitea for the |
In https://github.com/go-gitea/lgtm the Edit: https://docs.github.com/en/github/searching-for-information-on-github/finding-files-on-github |
Ugh, yeah if it's a hardcoded list, that's not going to be obvious. I suggest that if we do filtering based on files, either use |
we can easily use go-enry there is method |
That's sounds more reasonable, as rendering all file list in html will be quite an overkill |
I think maybe the solution may have better performance. On find file page, when loading, we can get all entries of currently tree via ajax and filter on frontend. When input a All entries will be cached on this page, so that if you delete a |
I didn't think much about excluded directories. That is really a problem. So, what is the best solution of it? If repo has |
I think just supporting |
Ok, I will solve it, thank you. |
@lafriks needs your review again. |
Co-authored-by: delvh <dev.lh@web.de>
* giteaoffical/main: Feature: Find files in repo (go-gitea#15028)
Finally, it is merged!!!! Personally thanks everyone that worked in the feature!!! You people are awesome!!! ❤️ |
* Create finding files page ui in repo page * Get tree entries for find repo files. * Move find files JS to individual file. * gen swagger. * Add enry.IsVendor to exclude entries Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This (short) PR builds upon #15028 and makes the file search case-insensitive. Previously, having a file named `TestFile.cs` would not be shown if `test` was typed in the search box. This now changes the matching function to be case-insensitive (without affecting the UI). The matching function, `strSubMatch`, is only used for this feature (it has been introduced by #15028), meaning that this PR does not affect the behaviour of any unrelated functionality of Gitea.
Find files for the specified branch in repo.
Issue for the feature:
#766