-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Compare-Object: -ExcludeDifferent should imply -IncludeEqual #11847
Copy link
Copy link
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Compare-Objectonly reports differences by default, requiring explicit opt-in for inclusion of equal objects via-IncludeEqual.Therefore, the only meaningful behavior when you use
-ExcludeDifferentis to default to-IncludeEqual.Without that, as is currently the case, nothing is ever output, so it is currently effectively pointless to pass
-ExcludeDifferentwithout also passing-IncludeEqual.Steps to reproduce
Expected behavior
Both tests should pass.
Actual behavior
The 2nd test fails, because
-IncludeEqualis not implied.Environment data