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

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

Returned by the rebase command on a successful (exit code 0) rebase operation.
For abort, continue, and skip operations, `{:ok, :done}` is returned instead.

# `t`

```elixir
@type t() :: %Git.RebaseResult{
  conflicts: boolean(),
  fast_forward: boolean(),
  raw: String.t(),
  up_to_date: boolean()
}
```

# `parse`

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

Parses the output of `git rebase` into a `Git.RebaseResult` struct.

Checks for known output patterns:

  - `"is up to date"` -- nothing to rebase
  - `"Fast-forwarded"` -- the rebase was a fast-forward
  - `"CONFLICT"` -- merge conflicts were encountered

## Examples

    iex> Git.RebaseResult.parse("Current branch main is up to date.\n")
    %Git.RebaseResult{up_to_date: true, fast_forward: false, conflicts: false, raw: "Current branch main is up to date.\n"}

    iex> Git.RebaseResult.parse("Successfully rebased and updated refs/heads/feat.\n")
    %Git.RebaseResult{up_to_date: false, fast_forward: false, conflicts: false, raw: "Successfully rebased and updated refs/heads/feat.\n"}

---

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