🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
Currently the applyDiff and gitCommitsForPackage does not use the correct resolved diif in case it's a valid range. We are not handling the case when the provided diff is infact a valid revision range.
if (revisionRange != null) {
if (revisionRange.isEmpty) {
revisionRange = null;
} else if (!_gitVersionRangeShortHandRegExp.hasMatch(revisionRange)) {
// If the revision range is not a valid revision range short hand then we
// assume it's a commit or tag and default to the range from that
// commit/tag to HEAD.
return '$revisionRange...HEAD';
} else {
+ return revisionRange;
}
}
Is there an existing issue for this?
Version
5.2.1
Description
Currently the
applyDiff
andgitCommitsForPackage
does not use the correct resolved diif in case it's a valid range. We are not handling the case when the provided diff is infact a valid revision range.https://github.com/invertase/melos/blob/main/packages/melos/lib/src/common/git.dart#L419-L428
Steps to reproduce
Run any command which includes the --diff filter.
eg: melos exec --fail-fast --diff=origin/main...HEAD -c 1 --include-dependents -- flutter test
Expected behavior
It should use the correct revision range.
Screenshots
No response
Additional context and comments
No response