class Git::Commands::ShowRef::Exists

Checks whether a single ref exists via ‘git show-ref –exists`

Returns without raising for three exit-status outcomes:

Callers inspect ‘result.status.exitstatus` to distinguish the three states. Unlike {ShowRef::Verify}, this mode never prints any output.

For standard ref listing, use {ShowRef::List}. For strict per-ref verification with output, use {ShowRef::Verify}. For stdin-based filtering, use {ShowRef::ExcludeExisting}.

@example Check whether a branch exists

cmd = Git::Commands::ShowRef::Exists.new(execution_context)
result = cmd.call('refs/heads/main')
result.status.exitstatus  # => 0 (exists) or 2 (not found)

@note Requires git 2.43 or later

Earlier versions do not recognise the `--exists` flag and will exit
non-zero with an "unknown option" error.

@note ‘arguments` block audited against git-scm.com/docs/git-show-ref/2.53.0

@see Git::Commands::ShowRef

@see git-scm.com/docs/git-show-ref git-show-ref documentation

@api private