Skip to content

test(diff): cover gitignore-drop interleaved with provider-exclude - #1300

Merged
lizhengfeng101 merged 1 commit into
alibaba:mainfrom
jimpablo:test/diff-gitignore-foreach-order
Sep 16, 2026
Merged

lizhengfeng101 merged 1 commit into
alibaba:mainfrom
jimpablo:test/diff-gitignore-foreach-order

Conversation

@jimpablo

Copy link
Copy Markdown
Contributor

Description

Adds the missing ForEachInOrder regression coverage from #1297: a tracked .gitignore-dropped file sitting between an included file and a provider-directory exclusion must not shift changeset order or be visited.

This is test-only. partitionDiffs / ForEachInOrder production logic is unchanged.

The gitignore-dropped file is committed before .gitignore is added so git diff HEAD still emits it and partitionDiffs is the layer that drops it — the case excludedAt must not count.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make test passes locally
  • make check passes locally

The new test fails if excludedAt is perturbed to count gitignore-dropped files (verified locally, not committed).

Checklist

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)
  • I have signed the CLA
  • 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.

AI/LLM disclosure: Grok 4.6 (Grok Build / xAI) was used to implement the test. I reviewed the diff. Commits carry no AI attribution.

Related Issues

Closes #1297

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review skipped: no items were selected.

@jimpablo jimpablo closed this Sep 16, 2026
@jimpablo jimpablo reopened this Sep 16, 2026
@jimpablo jimpablo closed this Sep 16, 2026
@jimpablo jimpablo reopened this Sep 16, 2026
@jimpablo jimpablo closed this Sep 16, 2026
@jimpablo jimpablo reopened this Sep 16, 2026

@lizhengfeng101 lizhengfeng101 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.

LGTM

@lizhengfeng101
lizhengfeng101 merged commit a694be5 into alibaba:main Sep 16, 2026
38 of 43 checks passed
Githab-capibara added a commit to Githab-capibara/open-code-review that referenced this pull request Sep 17, 2026
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.

test(diff): cover gitignore-drop interleaved with provider-exclude in ForEachInOrder

2 participants