module Git::Commands::ShowRef

Commands for querying git refs via ‘git show-ref`

This module contains command classes split by invocation mode:

@example List all refs matching a pattern

cmd = Git::Commands::ShowRef::List.new(execution_context)
result = cmd.call('refs/tags/', tags: true)
result.stdout
# => "abc1234 refs/tags/v1.0\ndef5678 refs/tags/v2.0\n"

@example Verify a specific ref

cmd = Git::Commands::ShowRef::Verify.new(execution_context)
result = cmd.call('refs/heads/main')
result.stdout  # => "abc1234 refs/heads/main\n"

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

@api private