Class: Git::Commands::Tag::Verify Private

Inherits:
Base
  • Object
show all
Defined in:
lib/git/commands/tag/verify.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Note:

arguments block audited against https://git-scm.com/docs/git-tag/2.53.0

Implements the git tag --verify command for verifying tag signatures

This command verifies the cryptographic signature of the given tag(s). It requires that the tags were signed with GPG or another supported signing backend.

Examples:

Verify a single tag

verify = Git::Commands::Tag::Verify.new(execution_context)
verify.call('v1.0.0')

Verify multiple tags

verify = Git::Commands::Tag::Verify.new(execution_context)
verify.call('v1.0.0', 'v2.0.0')

Verify with custom format output

verify = Git::Commands::Tag::Verify.new(execution_context)
verify.call('v1.0.0', format: '%(refname:short) %(contents:subject)')

See Also:

Instance Method Summary collapse

Methods inherited from Base

allow_exit_status, arguments, #initialize, requires_git_version, skip_version_validation

Constructor Details

This class inherits a constructor from Git::Commands::Base

Instance Method Details

#call(*tagname, **options) ⇒ Git::CommandLineResult

Execute the git tag --verify command to verify tag signatures

Returns the result of calling git tag --verify.

Parameters:

  • tagname (Array<String>)

    one or more tag names to verify

  • options (Hash)

    command options

Options Hash (**options):

  • :format (String) — default: nil

    a format string interpolating %(fieldname) from the tag ref being shown and the object it points at

    The format is the same as that of git-for-each-ref(1).

Returns:

Raises:

  • (ArgumentError)

    if unsupported options are provided

  • (ArgumentError)

    if no tagname operands are provided

  • (Git::FailedError)

    if git exits with a non-zero exit status



# File 'lib/git/commands/tag/verify.rb', line 45