Add default behavior for darc vmr diff command#5184
Merged
Conversation
…tation Co-authored-by: premun <7013027+premun@users.noreply.github.com>
Co-authored-by: premun <7013027+premun@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add default behaviour for
Add default behavior for Aug 22, 2025
darc vmr diffdarc vmr diff command
premun
reviewed
Aug 22, 2025
src/Microsoft.DotNet.Darc/Darc/Operations/VirtualMonoRepo/VmrDiffOperation.cs
Show resolved
Hide resolved
Co-authored-by: premun <7013027+premun@users.noreply.github.com>
premun
approved these changes
Aug 25, 2025
oleksandr-didyk
previously approved these changes
Aug 25, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements default behavior for the darc vmr diff command to allow diffing against all repositories in a VMR without requiring explicit arguments. The changes enable smart detection of mapping names versus URI/path arguments and provide organized output formatting.
Key changes:
- Made the
Repositoriesparameter optional inVmrDiffOptions - Added multi-repository diff functionality when no arguments are provided from a VMR directory
- Implemented smart detection to distinguish between mapping names and URI/path arguments
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| VmrDiffOptions.cs | Made Repositories parameter optional and updated nullable annotations |
| VmrDiffOperation.cs | Added comprehensive default behavior logic with multi-repo and single mapping support |
src/Microsoft.DotNet.Darc/Darc/Operations/VirtualMonoRepo/VmrDiffOperation.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Darc/Darc/Operations/VirtualMonoRepo/VmrDiffOperation.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Darc/Darc/Operations/VirtualMonoRepo/VmrDiffOperation.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Darc/Darc/Operations/VirtualMonoRepo/VmrDiffOperation.cs
Show resolved
Hide resolved
…iffOperation.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
oleksandr-didyk
approved these changes
Aug 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements default behavior for the
darc vmr diffcommand to eliminate the need for custom scripts when diffing against all repositories in a VMR.Changes Made
Core Implementation:
Repositoriesparameter optional inVmrDiffOptionsNew Functionality:
source-manifest.jsondarc vmr diff arcadeare detected as mapping names and diff only that specific repository--name-only, displays organized sections per repository with progress indicators--name-only, outputs complete diff content silently for programmatic useUsage Examples
Output Format
With
--name-onlyflag, the output matches the format from the PowerShell script:Backward Compatibility
All existing functionality is preserved. The change only adds new behavior when no repository arguments are provided, making the parameter optional without breaking existing usage patterns.
Fixes #5183.
💡 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.