DiffHunk

class DiffHunk

A contiguous run of changed lines from a blob diff, together with any surrounding unchanged context lines. Hunks are returned in order from the start of the file to the end. Adjacent or overlapping hunks are merged into a single hunk in the response.

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The number of lines from the after blob covered by this hunk, including any context lines.

Link copied to clipboard

The 1-based line number in the after blob where this hunk begins. When the hunk consists entirely of deletions, afterLineCount is 0.

Link copied to clipboard

The number of lines from the before blob covered by this hunk, including any context lines.

Link copied to clipboard

The 1-based line number in the before blob where this hunk begins. When the hunk consists entirely of additions, beforeLineCount is 0.

Link copied to clipboard

An ordered list of line-level changes that make up this hunk. Each entry indicates whether the line is unchanged context, an addition, or a deletion.

Functions

Link copied to clipboard
inline fun copy(block: DiffHunk.Builder.() -> Unit = {}): DiffHunk
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String