Skip to content

Conversation

@mbilda
Copy link
Contributor

@mbilda mbilda commented Apr 15, 2025

Closes: #1205

  • refactored GitContextImpl

- refactored GitContextImpl
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Apr 15, 2025
@mbilda mbilda marked this pull request as draft April 15, 2025 06:35
@mbilda mbilda changed the title 1205 : Fix Git implementation #1205 : Fix Git implementation Apr 15, 2025
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 14462897556

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 27 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.1%) to 67.461%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/process/ProcessResultImpl.java 1 75.0%
com/devonfw/tools/ide/git/GitContextImpl.java 26 67.41%
Totals Coverage Status
Change from base Build 14444609825: 0.1%
Covered Lines: 7879
Relevant Lines: 11278

💛 - Coveralls


ProcessResult result = runGitCommand(directory, ProcessMode.DEFAULT, args);
private void handleErrors(Path repository, ProcessResult result, String errorMessage) {
if (!result.isSuccessful()) {
Copy link
Contributor Author

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()) {
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@jan-vcapgemini jan-vcapgemini self-assigned this Jun 10, 2025
@jan-vcapgemini jan-vcapgemini moved this from 🆕 New to Team Review in IDEasy board Jun 10, 2025
@jan-vcapgemini jan-vcapgemini added git git version management tool integration enhancement New feature or request internal Nothing to be added to CHANGELOG, only internal story labels Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request git git version management tool integration internal Nothing to be added to CHANGELOG, only internal story

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Fix Git implementation

3 participants