-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Diff does not work as expected #557
Comments
Hey @spydon any update on this issue? Thanks |
There hasn't been any work done on this, if you know how to fix it feel free to provide a PR and I'll review it. :) |
@spydon can you guide or suggest me some ideas to make it support both the functionality? I can quickly work on a PR. Thanks |
@xsahil03x I haven't been involved in any of this functionality so I don't know unfortunately. I would suggest looking at the PR that simplified it and see what was changed there. |
Hey @spydon, I checked this #558 PR from @cameronklein and it looks perfect for solving this issue. I don't think we need to make any more changes. I can recreate the same PR cherryPicking his commits if you can review it. Thanks |
Is there an existing issue for this?
Version
3.1.1
Description
#454 changed the diff functionality by moving from
git diff
togit log
.The result can be identical in some cases, but not in all.
Notably it fails when maintaining a branch into which main has been merged.
git log
will flag packages that have changed in main since the branch was branched, even if the branch is fully up to date.(This is because the merge commits will appear in the affected packages when
git log -- .
is run.)The old code prior to #454 works as one would expect.
Steps to reproduce
foo
andbar
in mainfeature
from main.bar
package and commit them in thefeature
branch.foo
package and commit them.feature
branch, mergemain
intofeature
.melos exec --diff=main -- "echo hello"
foo
package and rungit diff main...HEAD -- .
and note that the diff is empty.Expected behavior
The documentation example notes that the diff command will:
Run 'flutter build iOS' on all packages that are different between current branch and the specified commit hash.
Melos should execute on only those packages that are different between the current branch and the specified commit hash.
Screenshots
No response
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: