GitDiff v0.4.0 GitDiff View Source

This helper library takes the output from git commands and parses them into Elixir data structures.

Currently only output from ‘git diff’ is supported.

Link to this section Summary

Functions

Parse the output from a ‘git diff’ command

Link to this section Functions

Link to this function parse_patch(git_diff) View Source
parse_patch(String.t()) ::
  {:ok, [%GitDiff.Patch{chunks: term(), from: term(), headers: term(), to: term()}]} |
  {:error, :unrecognized_format}

Parse the output from a ‘git diff’ command.

Returns {:ok, [%GitDiff.Patch{}]} in case of success, {:error, :unrecognized_format} otherwise.