Parsed representation of a git stash entry.
Contains the stash index, the branch the stash was created on, and the stash message.
Summary
Functions
Parses the output of git stash list into a list of Git.StashEntry structs.
Types
@type t() :: %Git.StashEntry{ branch: String.t() | nil, index: non_neg_integer(), message: String.t() }
Functions
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 messageExamples
iex> Git.StashEntry.parse("stash@{0}: On main: my changes\n")
[%Git.StashEntry{index: 0, branch: "main", message: "my changes"}]
iex> Git.StashEntry.parse("")
[]