-
Notifications
You must be signed in to change notification settings - Fork 234
gptel-context: Allow exclusion of gitignored files #665
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
base: master
Are you sure you want to change the base?
Conversation
(I just noticed that I forgot to set the default value of |
I would set it to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I've got one performance concern and one behavior suggestion.
Could you move all the git-related functions Additionally, anywhere you run a file-name function like |
It might be worth using |
…ames * Calling files not matching patterns in .gitignore ‘git-tracked’ was confusing because, in git terminology, ‘tracked’ has a technical meaning. So we now use ‘git-unignored’ instead, which more clearly conveys the idea of files not git-ignored.
I thought calling this function ‘gptel-context--is-git-ignored-p’ would make its purpose clear, but I now realize this is a misnomer: the value returned depends also on the user option gptel-context-exclude-git-ignored, so the function may return nil even when the file is git-ignored.
c37877d
to
e02f44e
Compare
@karthink, I believe I have now addressed all your requested changes. Let me know if you have further comments. |
Late to the party here (and I wouldn't want to derail this feature; I was recently bitten by it), but was the use of |
Hi @vermiculus. I didn’t consider using |
@vermiculus: I revised the PR to make it use It would be great if folks could test this before it is merged: I’m not a programmer and my eyes may fail to catch problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a pass here, though I'm just on my phone so sorry for formatting.
How does this perform functionally for you? Any noticeable delay with larger/smaller projects with more/fewer ignored build artifacts?
I see some whitespace changes that apparently just change spaces to TABs, most likely since emacs has |
a6faa40
to
b83fbcd
Compare
b83fbcd
to
c197a74
Compare
I think I'm basically done with the changes here. My only concern is that If and when @karthink agrees to merge this PR, I'm happy to do some squashing to clean up the commit history. |
(If the performance issue is not addressed, I am now inclined to set the default value of |
Continuing the discussion here, this PR allows the user to exclude, by setting the user option
gptel-context-exclude-gitignored
tot
, gitignored files or directories from the context.Tagging participants in previous discussion: @hartikainen, @collinarnett, @metachip, @sandinmyjoints.