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.
Summary
Functions
Parses the output of git rebase into a Git.RebaseResult struct.
Types
Functions
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"}