public interface DiffHunk
Modifier and Type | Method and Description |
---|---|
default Optional<String> |
getContext()
Retrieves the context snippet for the hunk, which may be
empty() depending on the SCM's ability to
detect it. |
int |
getDestinationLine() |
int |
getDestinationSpan() |
List<DiffSegment> |
getSegments() |
int |
getSourceLine() |
int |
getSourceSpan() |
boolean |
isTruncated() |
@Nonnull default Optional<String> getContext()
empty()
depending on the SCM's ability to
detect it.
Context is chosen by the SCM, and is based on the SCM's understanding of the syntax of the file. Depending on the syntax used, the SCM may not be able to detect the context or it may detect "incorrect" context.
empty()
if the SCM could not detect anyint getDestinationLine()
int getDestinationSpan()
@Nonnull List<DiffSegment> getSegments()
int getSourceLine()
int getSourceSpan()
boolean isTruncated()
true
if one or more entire segments were omitted due to the size of the hunk, or
if any lines were omitted from an included segment; otherwise, false
if all of the segments
and lines in the hunk are includedCopyright © 2019 Atlassian. All rights reserved.