fix: handle tracked paths in exclude queries#2735
Merged
Merged
Conversation
This makes isolated discovery easier, at the cost of less control compared to its `gix::ThreadSafeRepository` counterpart. Co-authored-by: GPT 5.6 <codex@openai.com>
While `normalize()` is optimised for keeping the look of paths the same, the new function truly wants to normalize. Co-authored-by: GPT 5.6 <codex@openai.com>
This way, one won't have to use the `Pattern + normalize` workaround anymore. Co-authored-by: GPT 5.6 <codex@openai.com>
Sebastian Thiel (Byron)
force-pushed
the
better-exclude-handling
branch
from
July 22, 2026 11:35
0f568e3 to
e8e72e2
Compare
Sebastian Thiel (Byron)
marked this pull request as ready for review
July 22, 2026 11:35
Sebastian Thiel (Byron)
enabled auto-merge
July 22, 2026 11:37
Sebastian Thiel (Byron)
force-pushed
the
better-exclude-handling
branch
from
July 22, 2026 11:38
e8e72e2 to
df65e52
Compare
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8e72e2dac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
Sebastian Thiel (Byron)
force-pushed
the
better-exclude-handling
branch
from
July 22, 2026 12:11
df65e52 to
4466269
Compare
<!-- agent --> `gix exclude query` reported ignore matches for tracked files and directories containing tracked entries, unlike `git check-ignore`. Positional arguments were also interpreted as pathspecs while stdin supplied paths. Treat positional and stdin input uniformly as paths, normalize them relative to the repository, and suppress ignore matches for indexed files or directories containing indexed entries. This changes positional arguments from pathspecs to paths. Add journey coverage for tracked and untracked paths below ignored directories, stdin from a nested working directory, ignore-pattern display, and positional output order. Co-authored-by: GPT 5.6 <codex@openai.com>
Co-authored-by: GPT 5.6 <codex@openai.com>
Sebastian Thiel (Byron)
force-pushed
the
better-exclude-handling
branch
from
July 22, 2026 12:25
4466269 to
6dcf76a
Compare
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.
Tasks
This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.
Everything below this line was generated by Codex.
Created by Codex on behalf of Byron. Byron will review before this is ready to merge.
Fixes #2562
Summary
Git baseline
Compared with git check-ignore and Git sources builtin/check-ignore.c and dir.c at a23bace963d508bd96983cc637131392d3face18.
Validation
This is the smaller command-scoped replacement for draft #2564; that draft is left untouched.