-
Notifications
You must be signed in to change notification settings - Fork 48
#1205 : Fix Git implementation #1241
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
base: main
Are you sure you want to change the base?
Conversation
- refactored GitContextImpl
Pull Request Test Coverage Report for Build 14462897556Details
💛 - Coveralls |
|
|
||
| ProcessResult result = runGitCommand(directory, ProcessMode.DEFAULT, args); | ||
| private void handleErrors(Path repository, ProcessResult result, String errorMessage) { | ||
| if (!result.isSuccessful()) { |
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.
This if clause is relevant to decide if the result was an error or not. If it wasn't an error, we don't need to "handle Errors". We should consider this if-check in the "parent" method or wherever it is called.
| warningOnError += " - Expected single line of output but received " + size + " lines from " + result.getCommand(); | ||
| } | ||
| private void requireOnline(String action) { | ||
| if (this.context.isOfflineMode()) { |
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.
Same es above. If we check if its offlineMode, then we don't need to check if its required to be online.
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.
Need to be analyzed in detail, because isOfflineMode and requireOnline could be two different things to consider.
Closes: #1205