GitDiff v0.5.0 GitDiff.Chunk View Source

Every patch generated by a ‘git diff’ command contains one or more chunks

Link to this section Summary

Functions

Defines the Chunk struct

Link to this section Functions

Link to this function %GitDiff.Chunk{} View Source (struct)

Defines the Chunk struct.

  • :from_start_line - The line at which this chunk began preimage.
  • :to_start_line - The line at which this chunk began postimages.
  • :from_num_lines - The number of lines in the file preimage.
  • :to_num_lines - The number of lines in the file postimages.
  • :header - The header indicating the format and the file names.
  • :lines - The lines of text contained within this chunk of changes. See GitDiff.Line.
  • :context - The extracted context from the header if there is one. A blank string otherwise.