class Git::Commands::Version
Wrapper for the ‘git version` command
Prints the git suite version.
@example Basic usage
version = Git::Commands::Version.new(execution_context) result = version.call result.stdout #=> "git version 2.42.0"
@note ‘arguments` block audited against git-scm.com/docs/git-version/2.53.0
@see Git::Commands
@see git-scm.com/docs/git-version git-version documentation
@api private
Public Instance Methods
Source
# File lib/git/commands/version.rb, line 57 def call(...) = super # rubocop:disable Lint/UselessMethodDefinition end
@overload call(**options)
Execute the `git version` command
@param options [Hash] command options
@option options [Numeric, nil] :timeout (nil) the number of seconds to wait
for the command to complete; if nil, uses the global timeout from
{Git::Config}; if 0, no timeout is enforced
@option options [Boolean, nil] :build_options (nil) include build options in
the output
@return [Git::CommandLine::Result] the result of calling `git version`
@raise [ArgumentError] if unsupported options are provided
@raise [Git::FailedError] if git exits with a non-zero exit status
@api public
Calls superclass method
Git::Commands::Base::call