fix: melos exec --diff=HEAD
does not detect uncommitted changes
#759
Labels
bug
Something isn't working
melos exec --diff=HEAD
does not detect uncommitted changes
#759
Is there an existing issue for this?
Version
6.1.0
Description
When using the
melos exec --diff=HEAD
command, I expected it to detect uncommitted changes and run the command in the affected packages. However, even though there are uncommitted changes, Melos detects 0 packages and does not execute the command.To demonstrate this issue, I have prepared a sample project that can be found here:
melos_git_diff_issue
Steps to reproduce
git diff HEAD
to confirm that there are uncommitted changes.melos exec --diff=HEAD -- basename $(pwd)
Expected behavior
According to the official documentation, the
--diff
filter should "filter packages based on whether there were changes between a commit and the current HEAD or within a range of commits."I expected Melos to detect uncommitted changes between the last commit (
HEAD
) and the working directory, and then execute the specified command in those affected packages. Specifically, any package with changes between the latest commit and the current working directory should be included, and the command should run in those packages.packageFilters
is expected to behave similarly, allowing packages to be filtered based on changes between commits or the working directory.Screenshots
Here are the relevant logs from running
melos analyze
andmelos exec --diff=HEAD
:melos analyze
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: