Skip to content

Keep fetch source time out of git checkouts - #24091

Merged
MikeMcQuaid merged 1 commit into
mainfrom
fetch-staging-clean-git-tree
Sep 26, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
fetch-staging-clean-git-tree

Conversation

@daeho-ro

Copy link
Copy Markdown
Member

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

.source_modified_time may break source completness, like

and so exclude it by using git exclude.

Copilot AI lite review requested due to automatic review settings September 25, 2026 14:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

馃煛 Changes recommended

Address the critical symlink-safety issue before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Updates resource staging to keep .source_modified_time out of Git checkout status.

Changes:

  • Adds the timestamp file to Git鈥檚 local exclude rules.
  • Adds regression coverage for the exclusion behavior.
File Summary
Library/鈥婬omebrew/鈥媟esource.rb Adds Git exclusion handling; a critical symlink-safety issue remains.
Library/鈥婬omebrew/鈥媡est/鈥媟esource_spec.rb Tests exclusion registration; coverage should verify Git recognizes the rule.

馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread Library/Homebrew/resource.rb Outdated
@daeho-ro
daeho-ro force-pushed the fetch-staging-clean-git-tree branch from 7568945 to 0b3542e Compare September 25, 2026 15:26

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks! Looks good when 馃煝 (style looks off just now)

@MikeMcQuaid
MikeMcQuaid force-pushed the fetch-staging-clean-git-tree branch from 0b3542e to 441eeda Compare September 26, 2026 00:29
@daeho-ro
daeho-ro force-pushed the fetch-staging-clean-git-tree branch from 441eeda to 02c7cc7 Compare September 26, 2026 15:18
- `def fetch` makes `Resource#unpack` write `.source_modified_time` into
  the shared staging directory, which is the formula's `buildpath`.
- For git checkouts this shows up as an untracked file, so builds that
  embed the working tree state report a dirty tree: Go stamps
  `vcs.modified=true` and `circleci version` prints `(modified)`.
- Add it to `.git/info/exclude`, as `.brew_home` gets a `.gitignore`.
@daeho-ro
daeho-ro force-pushed the fetch-staging-clean-git-tree branch from 02c7cc7 to cbbe73b Compare September 26, 2026 15:33
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 26, 2026
Merged via the queue into main with commit ce46735 Sep 26, 2026
51 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the fetch-staging-clean-git-tree branch September 26, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants