git_diff_from_buffer

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.

extern (C) nothrow @nogc
int
git_diff_from_buffer
(,
const(char)* content
,)

Parameters

out_ .git_diff**

A pointer to a git_diff pointer that will be allocated.

content const(char)*

The contents of a patch file

content_len size_t

The length of the patch file contents

Return Value

Type: int

0 or an error code

Meta