### Method

# Ggit Repository save_stash

#### Declaration [src]

    GgitOId*
    ggit_repository_save_stash (
      GgitRepository* repository,
      GgitSignature* stasher,
      const gchar* message,
      GgitStashFlags flags,
      GError** error
    )

#### Description [src]

Saves the local modifications to a new stash. It returns the commit containing the stashed state. This commit is also the target of the direct reference refs/stash.

#### Parameters

`stasher`

  Type: `GgitSignature`

  A `GgitSignature`.

  The data is owned by the caller of the method.

`message`

  Type: `const gchar*`

  Description along with the stashed state or `NULL` to be autogenerated.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`flags`

  Type: `GgitStashFlags`

  A `GgitStashFlags` to control the stashing process.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `GgitOId`

A new object id of the commit containing the stashed state.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.