Skip to content

Diff PRs without rename detection when picking test versions - #54

Merged
rick-lam merged 1 commit into
masterfrom
51/diff-without-renames
Oct 22, 2026
Merged

rick-lam merged 1 commit into
masterfrom
51/diff-without-renames

Conversation

@rick-lam

Copy link
Copy Markdown
Contributor

Summary

Refs #51. Follow-up to #53, from Copilot's review of it.

git diff --name-only uses rename detection by default and lists only the destination of a moved file, so the version selection added in #53 could miss the source side of a move.

Notable Changes

  • git diff --name-only --no-renames in the matrix job, so a move is listed as a deletion plus an addition.

QA

  • Demo repo: moving common/php.bats to 7.4/php.bats lists only 7.4/php.bats by default, and both paths with --no-renames.
  • The workflow's own filter, run on those paths: a move from common/ into 7.4/ tests all 7 versions, a move from 7.4/ to 8.3/ tests 7.4 and 8.3, and 7.4/-only changes still test just 7.4.

Deployment

None.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uugex1w8qZoTbBRbcFwkcp

With Git's default rename detection, git diff --name-only lists only the
destination of a moved file. Moving a file from common/ into 7.4/ would
then test only 7.4, and moving one from 7.4/ to 8.3/ would test only 8.3.
--no-renames lists both paths, so the source side is considered too.

Refs #51

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uugex1w8qZoTbBRbcFwkcp
Copilot AI balanced review requested due to automatic review settings October 22, 2026 04:17
@rick-lam rick-lam self-assigned this Oct 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused flag change correctly includes both sides of moved files, with no unresolved review findings.

No open issues 🎉

What changed in this PR

This follow-up to #53 fixes test-version selection for moved files, supporting #51’s goal of testing only affected PHP versions.

Changes:

  • Adds --no-renames to the PR diff so both source and destination paths inform test selection.
  • Preserves existing matrix filtering, fallback behavior, and push behavior.
File Description
.github/​workflows/​build.yml Disables rename detection when collecting changed paths for test-version selection.

Review effort: Balanced

@rick-lam
rick-lam merged commit 11d6286 into master Oct 22, 2026
7 of 9 checks passed
@rick-lam
rick-lam deleted the 51/diff-without-renames branch October 22, 2026 04:18
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.

2 participants