Title: Fix gitignore pathspec checks to resolve paths against repo root by JessicaMulein · Pull Request #556 · cecli-dev/cecli · GitHub
Open Graph Title: Fix gitignore pathspec checks to resolve paths against repo root by JessicaMulein · Pull Request #556 · cecli-dev/cecli
X Title: Fix gitignore pathspec checks to resolve paths against repo root by JessicaMulein · Pull Request #556 · cecli-dev/cecli
Description: Summary Add GitRepo._resolve_path_in_repo() so relative paths are resolved under self.root, not process cwd. Use it in _is_gitignored_by_pathspec() when walking .gitignore rules. Problem _is_gitignored_by_pathspec called Path(path).resolve() on relative paths. That resolves against the caller’s working directory, not the git repo root. In multi-repo / superproject setups (session cwd at a parent repo, GitRepo rooted at a submodule), tracked files could be falsely reported as gitignored and /add would reject them. Example: cecli submodule with whitelist .gitignore (* + !/cecli/**), cwd at superproject root, path cecli/helpers/responses.py mis-resolved and matched *. Test plan Unit: relative path under repo root resolves correctly regardless of process cwd Manual: superproject dogfood — /add cecli/cecli/helpers/responses.py succeeds when cwd is parent repo root
Open Graph Description: Summary Add GitRepo._resolve_path_in_repo() so relative paths are resolved under self.root, not process cwd. Use it in _is_gitignored_by_pathspec() when walking .gitignore rules. Problem _is_giti...
X Description: Summary Add GitRepo._resolve_path_in_repo() so relative paths are resolved under self.root, not process cwd. Use it in _is_gitignored_by_pathspec() when walking .gitignore rules. Problem _is_giti...
Opengraph URL: https://github.com/cecli-dev/cecli/pull/556
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:295f80e8-167f-7321-da07-50ac6724248e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AF82:A3BF2:1F094D:28DE72:6A616DDB |
| html-safe-nonce | 0ec1d7a3c60b65259004cadc0a48ededf8fcfc53f443bcfcb526a930a844be8a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjgyOkEzQkYyOjFGMDk0RDoyOERFNzI6NkE2MTZEREIiLCJ2aXNpdG9yX2lkIjoiNjMyNzAwNjMzNTE1MTk5MjI4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e6444e881cd445d5188a4712230bc8731333605b43e23136b835b5b0dd6f33d6 |
| hovercard-subject-tag | pull_request:3806162263 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/cecli-dev/cecli/pull/556/files |
| twitter:image | https://avatars.githubusercontent.com/u/3766240?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3766240?s=400&v=4 |
| og:image:alt | Summary Add GitRepo._resolve_path_in_repo() so relative paths are resolved under self.root, not process cwd. Use it in _is_gitignored_by_pathspec() when walking .gitignore rules. Problem _is_giti... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a69385f7d268ece7ad25b131bbd70f457024811fc79afcae43785a6849b724e2 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/cecli-dev/cecli git https://github.com/cecli-dev/cecli.git |
| octolytics-dimension-user_id | 250452847 |
| octolytics-dimension-user_login | cecli-dev |
| octolytics-dimension-repository_id | 1030985330 |
| octolytics-dimension-repository_nwo | cecli-dev/cecli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 638629097 |
| octolytics-dimension-repository_parent_nwo | Aider-AI/aider |
| octolytics-dimension-repository_network_root_id | 638629097 |
| octolytics-dimension-repository_network_root_nwo | Aider-AI/aider |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 484cf265a1f970d5c7a5e7c37cb677d8010aa12f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width