Merge conflict detection and resolution helpers that compose Git.status/1
and Git.merge/2.
All functions accept an optional keyword list. Use :config to specify the
repository via a Git.Config struct; when omitted a default config is built
from the environment.
Summary
Functions
Aborts an in-progress conflicted merge.
Checks whether the repository is in a conflicted state.
Lists file paths that have merge conflicts.
Checks whether all conflicts have been resolved.
Functions
Aborts an in-progress conflicted merge.
Delegates to Git.merge(:abort).
Options
:config- aGit.Configstruct
Examples
{:ok, :done} = Git.Conflicts.abort_merge()
Checks whether the repository is in a conflicted state.
Uses Git.status/1 and inspects entries for unmerged status codes.
Returns {:ok, true} when conflicts exist, {:ok, false} otherwise.
Options
:config- aGit.Configstruct
Examples
{:ok, false} = Git.Conflicts.detect()
Lists file paths that have merge conflicts.
Uses Git.status/1 and filters for entries with unmerged status codes.
Returns {:ok, [String.t()]}.
Options
:config- aGit.Configstruct
Examples
{:ok, files} = Git.Conflicts.files()
Checks whether all conflicts have been resolved.
This is the inverse of detect/1 -- returns {:ok, true} when no unmerged
files exist.
Options
:config- aGit.Configstruct
Examples
{:ok, true} = Git.Conflicts.resolved?()