Parsed representation of a git submodule status entry.
Each entry contains the SHA, path, an optional describe string (tag describe for the SHA), and a status indicating the submodule state.
Status values
:current- submodule is checked out at the recorded commit:modified- submodule has a different commit checked out:uninitialized- submodule is not initialized:conflict- submodule has merge conflicts
Summary
Functions
Parses the output of git submodule status into a list of
Git.SubmoduleEntry structs.
Types
Functions
Parses the output of git submodule status into a list of
Git.SubmoduleEntry structs.
Each line has the format:
<status_char><sha> <path> (<describe>)where <status_char> is a space (current), + (modified),
- (uninitialized), or U (conflict), and the describe portion
is optional.
Examples
iex> Git.SubmoduleEntry.parse(" abc1234 lib/sub (v1.0.0)\n")
[%Git.SubmoduleEntry{sha: "abc1234", path: "lib/sub", describe: "v1.0.0", status: :current}]
iex> Git.SubmoduleEntry.parse("+def5678 vendor/dep\n")
[%Git.SubmoduleEntry{sha: "def5678", path: "vendor/dep", describe: nil, status: :modified}]
iex> Git.SubmoduleEntry.parse("")
[]