-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add Git cli calls into output channel #2225
Conversation
bfd51fc
to
e818412
Compare
e818412
to
e08cf2c
Compare
@@ -10,98 +8,9 @@ export const GIT_REFS = join(DOT_GIT, 'refs') | |||
export const GIT_LOGS_REFS = join(DOT_GIT, 'logs', 'refs') | |||
export const HEADS_GIT_REFS = join(GIT_REFS, 'heads') | |||
|
|||
const getUris = (repositoryRoot: string, relativePaths: string[]) => |
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.
[F] These are the all the functions that got moved into the new classes.
getStageAllCommand(repositories) | ||
internalCommands.registerExternalCliCommand<Root>( | ||
RegisteredCliCommands.GIT_STAGE_ALL, | ||
getStageAllCommand(repositories, internalCommands) |
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.
[F] The extension will now "offer to show errors" (open the output channel) if these commands fail.
Will have to integrate with #2091 |
}) | ||
|
||
it('should reset the workspace if the user confirms they want to', async () => { | ||
const mockCheckout = stub(CliExecutor.prototype, 'checkout').resolves('') | ||
const mockGitReset = stub(ProcessExecution, 'executeProcess').resolves('') | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const mockExecuteProcess = stub(Cli.prototype as any, 'executeProcess') |
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.
Move to a util so that we only have one elint-disable
?
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.
I'll sort this out for good by adding a test util as a follow-up today.
Code Climate has analyzed commit aef6524 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 97.7% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.7% (0.1% change). View more on Code Climate. |
1/2
main
<- this <- #2226This PR moves all calls made to Git into the DVC output channel. This will make the user aware of these calls and should let them debug should something go wrong.
Demo
Screen.Recording.2022-08-22.at.1.10.50.pm.mov