Ggit.Patch.new_from_blobs
Description: Reference for Ggit.Patch.new_from_blobs

### Function

# Ggit Patchnew_from_blobs

#### Declaration [src]

    GgitPatch*
    ggit_patch_new_from_blobs (
      GgitBlob* old_blob,
      const gchar* old_as_path,
      GgitBlob* new_blob,
      const gchar* new_as_path,
      GgitDiffOptions* diff_options,
      GError** error
    )

#### Description [src]

Directly generate a patch from the difference between two blobs.

This is just like `ggit_diff_blobs()` except it generates a patch object for the difference instead of directly making callbacks. You can use the standard ggit_patch accessor functions to read the patch data, and you must call ggit_patch_unref on the patch when done.

#### Parameters

`old_blob` | `GgitBlob`
| A `GgitBlob` to diff from.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`old_as_path` | `const gchar*`
| Treat `old_blob` as if it had this filename, or `NULL`,
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`new_blob` | `GgitBlob`
| A `GgitBlob` to diff to.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`new_as_path` | `const gchar*`
| Treat `new_blob` as if it had this filename, or `NULL`,
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`diff_options` | `GgitDiffOptions`
| A `GgitDiffOptions`, or `NULL`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `GgitPatch`
| A newly created `GgitPatch` or `NULL`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.
| The return value can be `NULL`.