Parsed representation of a git cherry output line.
Each entry indicates whether a commit has been applied upstream (cherry-picked) and includes the commit SHA and optionally the subject line when verbose mode is used.
Summary
Functions
Parses the output of git cherry into a list of Git.CherryEntry structs.
Types
Functions
Parses the output of git cherry into a list of Git.CherryEntry structs.
Each line starts with + (not applied upstream) or - (already applied),
followed by a SHA. With -v, a subject line follows the SHA.
Examples
iex> Git.CherryEntry.parse("+ abc1234\n- def5678\n")
[
%Git.CherryEntry{applied: false, sha: "abc1234", subject: nil},
%Git.CherryEntry{applied: true, sha: "def5678", subject: nil}
]
iex> Git.CherryEntry.parse("+ abc1234 add feature\n- def5678 fix bug\n")
[
%Git.CherryEntry{applied: false, sha: "abc1234", subject: "add feature"},
%Git.CherryEntry{applied: true, sha: "def5678", subject: "fix bug"}
]
iex> Git.CherryEntry.parse("")
[]