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

Represents the parsed result of a `git pull` command.

Contains boolean flags indicating the type of pull that occurred and the
raw output string for further inspection.

# `t`

```elixir
@type t() :: %Git.PullResult{
  already_up_to_date: boolean(),
  conflicts: boolean(),
  fast_forward: boolean(),
  merge_commit: boolean(),
  raw: String.t()
}
```

# `parse`

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

Parses the output of `git pull` into a `Git.PullResult` struct.

Checks the output for known patterns:

- `"Already up to date"` -- no changes pulled
- `"Fast-forward"` -- fast-forward merge
- `"Merge made by"` -- a merge commit was created
- `"CONFLICT"` -- merge conflicts detected

## Examples

    iex> Git.PullResult.parse("Already up to date.\n")
    %Git.PullResult{already_up_to_date: true, fast_forward: false, merge_commit: false, conflicts: false, raw: "Already up to date.\n"}

    iex> result = Git.PullResult.parse("Updating abc..def\nFast-forward\n file.txt | 1 +\n")
    iex> result.fast_forward
    true

---

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