Ggit.Diff.new_tree_to_workdir
Description: Reference for Ggit.Diff.new_tree_to_workdir

### Constructor

# Ggit Diffnew_tree_to_workdir

#### Declaration [src]

    GgitDiff*
    ggit_diff_new_tree_to_workdir (
      GgitRepository* repository,
      GgitTree* old_tree,
      GgitDiffOptions* diff_options,
      GError** error
    )

#### Description [src]

Creates a `GgitDiff` which compares the working directory and `old_tree`.

If `diff_options` is `NULL` then the defaults specified in `ggit_diff_options_new()` are used.

#### Parameters

`repository` | `GgitRepository`
| A `GgitRepository`.
| The data is owned by the caller of the function.
`old_tree` | `GgitTree`
| A `GgitTree` to diff from.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`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: | `GgitDiff`
| A newly allocated `GgitDiff` if there was no error, `NULL` otherwise.
| The caller of the function takes ownership of the data, and is responsible for freeing it.
| The return value can be `NULL`.