# `Git.StashEntry`
[🔗](https://github.com/joshrotenberg/git_wrapper_ex/blob/main/lib/git/stash_entry.ex#L1)

Parsed representation of a git stash entry.

Contains the stash index, the branch the stash was created on,
and the stash message.

# `t`

```elixir
@type t() :: %Git.StashEntry{
  branch: String.t() | nil,
  index: non_neg_integer(),
  message: String.t()
}
```

# `parse`

```elixir
@spec parse(String.t()) :: [t()]
```

Parses the output of `git stash list` into a list of `Git.StashEntry` structs.

Each line has the form:

    stash@{0}: On main: my changes
    stash@{1}: WIP on main: abc1234 commit message

## Examples

    iex> Git.StashEntry.parse("stash@{0}: On main: my changes\n")
    [%Git.StashEntry{index: 0, branch: "main", message: "my changes"}]

    iex> Git.StashEntry.parse("")
    []

---

*Consult [api-reference.md](api-reference.md) for complete listing*
