Read the contents of a git patch file into a git_diff object.
The diff object produced is similar to the one that would be
produced if you actually produced it computationally by comparing
two trees, however there may be subtle differences. For example,
a patch file likely contains abbreviated object IDs, so the
object IDs in a git_diff_delta produced by this function will
also be abbreviated.
This function will only read patch files created by a git
implementation, it will not read unified diffs produced by
the diff program, nor any other types of patch files.
@param out_ A pointer to a git_diff pointer that will be allocated.
@param content The contents of a patch file
@param content_len The length of the patch file contents
@return 0 or an error code
Read the contents of a git patch file into a git_diff object.
The diff object produced is similar to the one that would be produced if you actually produced it computationally by comparing two trees, however there may be subtle differences. For example, a patch file likely contains abbreviated object IDs, so the object IDs in a git_diff_delta produced by this function will also be abbreviated.
This function will only read patch files created by a git implementation, it will not read unified diffs produced by the diff program, nor any other types of patch files.
@param out_ A pointer to a git_diff pointer that will be allocated. @param content The contents of a patch file @param content_len The length of the patch file contents @return 0 or an error code