-
-
Notifications
You must be signed in to change notification settings - Fork 116
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: check for commit ref for --to
and --from
parameters
#985
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #985 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 44 44
Lines 990 994 +4
Branches 103 105 +2
=========================================
+ Hits 990 994 +4 ☔ View full report in Codecov by Sentry. |
39cb93c
to
00cea45
Compare
You may want to test this @nvuillam |
You can follow those steps to easily test this PR locally |
0126c2c
to
519f89c
Compare
Sfdx-hardis always uses --to argument so if you don't change its behavior when a value is sent, it's not a breaking change so ok for me 😊 |
Additional note: if it changes the behavior when --to is not sent, if u respect semver your next release will be 7.0.0 😊 |
b123525
to
8584e86
Compare
That's right, and it would have been the case with the previous version of this PR. |
Quick follow up here of your tests @thomas100z Can you tell me how to reproduce your remarks here ("new file are not added") |
What I was doing comes down to these steps:
|
Unfortunately it is not possible to This makes me wonder if we really need this or if just using the workaround to commit before running sgd would be enough. With the current change on -> Unstage new files if not needed finally Without the current change on -> Soft reset in the end, instead of unstaging new files Your opinion about this @mehdicherf ? |
… new default value
8584e86
to
82b091b
Compare
@scolladon My 2 cents: I didn't even think about that use case where My personal opinion is that there is little value in offering a diff to staged (because as you mentioned, there needs to be a step to stage the files, and currently the user can simply do an additional commit (and reset later) if needed. That being said, since you already did the job, I don't have see any objections either to include this feature in the plugin, as long as it's not a breaking change for existing situations where |
Ok I will roll back the new feature to take the uncommitted work. This PR and the related discussions were very helpful. It also helped find a way to deploy uncommitted changes and new files:
|
--to
and --from
parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR diff size of 6827 lines exceeds the maximum allowed for the inline comments feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR diff size of 6836 lines exceeds the maximum allowed for the inline comments feature.
Code Climate has analyzed commit 4c18b7a and detected 0 issues on this pull request. View more on Code Climate. |
Shipped in release $ sf plugins install sfdx-git-delta@latest-rc
# Or
$ sf plugins install [email protected] 💡 Enjoying sfdx-git-delta? |
Explain your changes
Fixes an issue with how
rev-parse
was used to check--to
or--from
parameters contentBefore it was possible to pass "." or ".." to either
--to
or--from
. Ourrev-parse
check did not return errors but was not returning parsed revision as well.This could lead to very strange behaviour and could mess with inFile comparison and "include" feature handling.
Now the plugin uses the parameter
--verify
for therev-parse
command which checks only for revision or alias of revisionImproves how error are communicate to end users.
Before error where not displayed when not using
--json
Leaving the user interpret the result based on the exit code (not the most user friendly)
Now the plugin display the error with its message in the end or the success !
Improves CI speed
Disable SF CLI autoupdate and telemetry