Class: Git::Commands::ShowRef::Verify Private
- Defined in:
- lib/git/commands/show_ref/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.
arguments block audited against https://git-scm.com/docs/git-show-ref/2.53.0
Strict per-ref verification command via git show-ref --verify
Verifies that refs exist by their full canonical name (e.g.
refs/heads/main, refs/tags/v1.0). Unlike List, partial
name matching is not performed. Every named ref must start with refs/
(or be HEAD); anything else will cause git to exit non-zero.
When a ref cannot be resolved, git exits 1 and this class raises FailedError. This strict behaviour makes the class suitable for validating that refs are fully qualified.
For pattern-based listing, use List. For stdin-based filtering, use ExcludeExisting. For a silent boolean check (git >= 2.43), use Exists.
Instance Method Summary collapse
-
#call(*ref, **options) ⇒ Git::CommandLineResult
Execute
git show-ref --verifyto verify refs by their full name.
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(*ref, **options) ⇒ Git::CommandLineResult
|
|
# File 'lib/git/commands/show_ref/verify.rb', line 75
|