Add toString() to FetchResult and RebaseResult#258
Open
hqqw2h-lgtm wants to merge 1 commit intoeclipse-jgit:masterfrom
Open
Add toString() to FetchResult and RebaseResult#258hqqw2h-lgtm wants to merge 1 commit intoeclipse-jgit:masterfrom
hqqw2h-lgtm wants to merge 1 commit intoeclipse-jgit:masterfrom
Conversation
PullResult.toString() delegates to FetchResult and RebaseResult but neither class overrides toString(), resulting in unhelpful output like 'FetchResult@359d2e00'. Add meaningful toString() implementations that include key state such as URI, ref update counts, status, conflicts, and failing paths. Bug: eclipse-jgit#256 Signed-off-by: hanweiwei <duzielww@163.com> Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PullResult.toString()delegates toFetchResult.toString()andRebaseResult.toString(), but neither class overridestoString(), resulting in unhelpful output likeorg.eclipse.jgit.transport.FetchResult@359d2e00.This PR adds meaningful
toString()implementations to both classes:FetchResult: includes URI, ref update count, submodule count, and remote messages.
RebaseResult: includes status, current commit, conflicts, failing paths, and uncommitted changes.
Tests
FetchResultTestwith tests for empty result, result with URI, and result with submodules.RebaseResultTestwith tests for OK, UP_TO_DATE, FAST_FORWARD, CONFLICTS, UNCOMMITTED_CHANGES, and ABORTED statuses.Bug: #256