todotreeview: option to ignore all files not commited to git#22
Open
bf wants to merge 2 commits intodrmargarido:masterfrom
Open
todotreeview: option to ignore all files not commited to git#22bf wants to merge 2 commits intodrmargarido:masterfrom
bf wants to merge 2 commits intodrmargarido:masterfrom
Conversation
adding option to ignore all files which have not been added to the git repo
Author
|
This fixes an issue in lite-xl where PDF files which are in the project folder but not commited to the git repository would be scanned for the keywords. If a keyword like BUG was found the PDF binary data would be displayed in the UI, which is obviously not intended. For me best heuristic was to discern between files which are commited to git and files which are not. So now there is a setting where you can ignore all files which are not part of the git repository. |
remove logging
drmargarido
requested changes
Jan 23, 2025
| description = "Ignore all files which are not commited to the current git repository.", | ||
| path = "todo_only_files_from_git_repository", | ||
| type = "toggle", | ||
| default = true, |
Owner
There was a problem hiding this comment.
This is very specific behaviour for your use case, set the default to false.
|
|
||
| local git_files = {} | ||
| for relative_path_from_project_root in string.gmatch(file_list_str, "([^\n]+)") do | ||
| -- git_files[git_root .. PATHSEP .. relative_path_from_project_root] = true |
|
|
||
| -- get list of all files in git repo | ||
| function TodoTreeView.get_all_files_in_git_repo() | ||
| -- local git_root = exec({"git", "rev-parse", "--show-toplevel"}):match( "^%s*(.-)%s*$" ) |
| todo_expanded = true, | ||
|
|
||
| -- Ignore all files which are not part of the git repository | ||
| todo_only_files_from_git_repository = true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adding option to ignore all files which have not been added to the git repo