Skip to content

Conversation

Copy link

Copilot AI commented Jan 23, 2026

Adds regression test for issue rust-lang#16547 where cargo publish was incorrectly flagging files in gitignored nested repositories as uncommitted changes.

Test scenario

  • Main git repository with a Cargo package
  • Nested git repository in tests/fixtures/ (gitignored)
  • Files committed in the nested repository
  • cargo publish should succeed without "uncommitted changes" errors

The test currently passes, verifying the issue is resolved. If the bug were present, publish would fail with:

ERROR: 1 files in the working directory contain changes that were not yet committed into git:
tests/fixtures/nested-repo/.github/workflow.yml

This mirrors the real-world case from gitoxide where test fixtures are themselves git repositories.

Original prompt

Look at this issue and create a test-case for cargo publish which involves a .gitignored repository within the crate to be published. It should reproduce the issue, calling ignored files uncommitted changes.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add test case for cargo publish with .gitignored files Add test for cargo publish with gitignored nested git repositories Jan 23, 2026
Copilot AI requested a review from Byron January 23, 2026 04:15
Co-authored-by: Byron <63622+Byron@users.noreply.github.com>
@Byron Byron force-pushed the copilot/create-test-case-for-cargo-publish branch from c8649e4 to da53f06 Compare January 23, 2026 05:27
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